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

Guard setState so that it is not called when the container is already unmounted #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leonid-shevtsov
Copy link

This is mostly done to silence a warning in React:

Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component CalculatorContainer. This is a no-op.

See discussion at facebook/react#2787

As this issue is unresolved and there is no final opinion from React devs, I think it's prudent to add a guard for the time being.

@leonid-shevtsov
Copy link
Author

cc @XeeD @mikekreeki

@XeeD
Copy link

XeeD commented Jul 3, 2015

👍

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