-
Notifications
You must be signed in to change notification settings - Fork 45.6k
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: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op." has no context #3878
Comments
This sounds like a great idea. |
+1 |
3 similar comments
+1 |
+1 |
+1 |
Please stop +1ing, it adds zero value. We have already identified that this is a good idea. |
GitHub really needs to automatically consolidate +1 comments into a single block and do a digest email for +1s. |
Got an PR for this: #3913 New message will be like this:
|
PR is merged so we should probably close this now. |
Thanks for taking this on! |
Is the new context-sensitive warning working for everyone? I'm getting the old warning without any context on 0.13.3. |
#3913 was not shipped to 0.13.x |
+1 |
1 similar comment
+1 |
The fix was landed, any additional +1 is pure noise. Please stop. |
+1 ;) |
+1 |
The "Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op." warning contains no context of what component setState was run on.
setState can happen at any time and changes to another component can be the cause of an unmount that results in the setState happening when unmounted so it's hard to even link the most recent code chagne you made to what setState call is responsible.
Simply including the
displayName
in the message like other warnings have should help devs at least a little in tracking down the source of this warning.The text was updated successfully, but these errors were encountered: