Skip to content

fixed warning for state changes for unmounted component #9

Open
Arvind90475 wants to merge 5 commits intoWebDevSimplified:masterfrom
Arvind90475:memory-leak-bug
Open

fixed warning for state changes for unmounted component #9
Arvind90475 wants to merge 5 commits intoWebDevSimplified:masterfrom
Arvind90475:memory-leak-bug

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