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

Fix unmounted setstate warning #1338

Merged
merged 2 commits into from
Feb 17, 2019

Conversation

wdoug
Copy link
Contributor

@wdoug wdoug commented Feb 16, 2019

What does this PR do?

  • Updates the testing setup to make sure console.error being called in a test causes them to fail
    • This is making the assumption that these calls to console.error are for doing bad things with React. This could be changed if this assumption is not valid in the future
  • Fixes the issues that were causing React to produce these warnings (Closes Can't perform a React state update on an unmounted component. #1217)

Background context

While the particular warning about calling setState on an unmounted component is a no-op, the warning from React is confusing and make it seem like consumers of this library have errors in their own code.

@jaredpalmer jaredpalmer merged commit 5f52e57 into jaredpalmer:master Feb 17, 2019
@wdoug wdoug deleted the unmounted-setstate-#1217 branch February 19, 2019 01:38
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.

2 participants