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

Added component displayName to warning message in ReactUpdateQueue.js #3913

Merged

Conversation

edvinerikson
Copy link
Contributor

ref #3878
New message will look like this:

Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. Please check the code for the ExampleApplication component. This is a no-op.

@edvinerikson
Copy link
Contributor Author

The WebWorker test seems to be failing:

>> not ok 345 - renderers/dom/client/__tests__/ReactWebWorker-test ReactWebWorker can run React in a web worker.

@edvinerikson
Copy link
Contributor Author

@zpao can you or someone else please review this?

'component. This is a no-op.',
'This usually means you called %s() on an unmounted component. ' +
'Please check the code for the %s component. ' +
'This is a no-op.',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's reverse this line and the one before it (so "no-op" comes first)

@zpao
Copy link
Member

zpao commented Jun 4, 2015

I think just the one comment and then could you rebase (we had a bunch of files move and lint changes in the last 2 weeks)

@zpao
Copy link
Member

zpao commented Jun 4, 2015

👍 looks good.

zpao added a commit that referenced this pull request Jun 4, 2015
…g-message

Added component displayName to warning message in ReactUpdateQueue.js
@zpao zpao merged commit da27129 into facebook:master Jun 4, 2015
@edvinerikson edvinerikson deleted the edvinerikson/better-warning-message branch June 6, 2015 17:10
@TimDaub
Copy link

TimDaub commented Jun 8, 2015

I love you for this one <3

@joshhornby
Copy link

Did this make it into version 13.3?

@dmitry
Copy link

dmitry commented Jul 21, 2015

@joshhornby no. Merged just 1.5 months ago, and 13.3 was released more than 2 months ago.

@joshhornby
Copy link

@dmitry Ah ok, is there an easy way to use this now?

@edvinerikson
Copy link
Contributor Author

You should be able to use it in the 0.14-beta-1 version

@tomazahlin
Copy link

Any updates on this? For some reason, I get this message with: Please check the code for the undefined component. Using react 15.2.1

@gaearon
Copy link
Collaborator

gaearon commented Sep 5, 2016

This fix didn't work for ES classes and functional components. A follow up fix was merged in #7326 and released in 15.3.0 so please update to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants