Skip to content

Nested connected components trowing Warning: setState(...) #92

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

Closed
Agamennon opened this issue Sep 5, 2015 · 5 comments
Closed

Nested connected components trowing Warning: setState(...) #92

Agamennon opened this issue Sep 5, 2015 · 5 comments

Comments

@Agamennon
Copy link

I was on redux v1 and i was having no issues, now i upgraded redux and react-redux and i am getting
"Warning: setState(...): Can only update a mounted or mounting component." On some of my components (they are nested connected components), i am trying to find what changed that is causing this with no luck!.

@gaearon
Copy link
Contributor

gaearon commented Sep 6, 2015

The only way we can help you is if you provide a reproducible example causing the issue.

@gaearon gaearon closed this as completed Sep 6, 2015
@gaearon
Copy link
Contributor

gaearon commented Sep 6, 2015

To clarify: please reopen if you can set up a project that shows the problem.

@alexkuz
Copy link

alexkuz commented Sep 6, 2015

This kind of error usually happens when you're trying to update component state in a deferred function (like setTimeout), without canceling it in componentWillUnmount. I would suggest to check your code for that.

@Agamennon
Copy link
Author

Made an example repo, details to help understand the example in the repository readme. @alexkuz i think that maybe that's whats happening inside react-redux, what is not clear, is how the app is triggering it.

@gaearon
Copy link
Contributor

gaearon commented Sep 6, 2015

Should be fixed in 2.1.1 via #96.

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

No branches or pull requests

3 participants