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 logged when visiting most pages #352

Closed
toolness opened this issue Jul 29, 2020 · 0 comments · Fixed by #353

Comments

@toolness
Copy link
Contributor

This is coming from NotRegisteredPage, which is particularly odd because it's being logged on pages that are registered. It seems like something's causing the component to be mounted momentarily; that component starts a network request on mount and a setState on request completion, but by that point the component has already been unmounted, hence the warning.

This was likely introduced by #346.

@toolness toolness added this to the Technical Debt Cleanup milestone Jul 29, 2020
toolness added a commit that referenced this issue Jul 29, 2020
@toolness toolness mentioned this issue Jul 29, 2020
sraby pushed a commit that referenced this issue Jul 29, 2020
This fixes #352. The bug was indeed introduced by #346, which essentially split what was previously a single state update into two separate ones: this then caused render() to be called in a state where the <NotRegisteredPage> was mounted and immediately unmounted.
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 a pull request may close this issue.

1 participant