More helpful message if you update an unrendered component#294
More helpful message if you update an unrendered component#294zpao merged 3 commits intofacebook:masterfrom
Conversation
|
I think this might be better protected against by inspecting lifecycle state. We do something similar for And now that I'm looking more, we actually protect against this in |
|
@zpao updated, with a test |
|
👍 I'm pulling this in for review internally right now |
There was a problem hiding this comment.
We can fit this whole var instance = .... onto a single line, so lets do that.
|
Cool, done! Any reason |
|
It's a soft limit but we try to stick to it as much as possible. It would be great to make it possible to have multiple passes so that we could give a warning but not fail (the |
|
Accepted. Thanks a lot @clayallsopp! |
More helpful message if you update an unrendered component
We had a logic bug in our app where
replacePropswas called before the component wasrenderComponent'd. The current error thrown isUncaught TypeError: Cannot read property 'constructor' of undefined, which isn't super helpful.Not sure this is the best/correct way to do this, but would love to know what is :)