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

fixed warning for state changes for unmounted component #9

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Arvind90475
Copy link

In Login and signup component after the history.push() , state is being updated which causes the warning that unmounted component's state cannot be updated. It is happening because of the setLoading outside the try catch block.
I have moved the setLoading before the history.push() to fix this.

cheers

@nzoor
Copy link

nzoor commented Apr 15, 2021

Thank you! I was banging my head around trying to figure out where the warning was coming from.

@rohithandique
Copy link

You're a genius! I was soooo frustrated for not being able to fix that issue. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants