nextacular / nextacular

An open-source starter kit that will help you build full-stack multi-tenant SaaS platforms efficiently and help you focus on developing your core SaaS features. Built on top of popular and modern technologies such as Next JS, Tailwind, Prisma, and Stripe.

Home Page:https://nextacular.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning: Can't perform a React state update on an unmounted component.

web-programmer-here opened this issue · comments

Console log error for the login page

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
Login@webpack-internal:///./src/pages/auth/login.js:112:77

caused by this

useEffect(() => {
(async () => {
const socialProviders = [];
const { email, ...providers } = await getProviders();
for (const provider in providers) {
socialProviders.push(providers[provider]);
}
setSocialProviders([...socialProviders]);
})();
}, []);

This needs improvement on how to open and close asynchronous calls in useEffect.