Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
web-programmer-here opened this issue Jun 14, 2022 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@web-programmer-here
Copy link

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]);
})();
}, []);

@arjayosma arjayosma added bug Something isn't working enhancement New feature or request labels Sep 1, 2022
@arjayosma
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants