You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But we can easily detect it by checking for $$typeof and in that case suggest something more concrete (e.g. "Did you accidentally export JSX instead of a component?").
The text was updated successfully, but these errors were encountered:
* [#13130] Add a more helpful message when passing an element to createElement()
* better conditional flow
* update after review
* move last condition inside last else clause
* Added test case
* compare 25132typeof to REACT_ELEMENT_TYPE
* runs prettier
* remove unrelated changes
* Tweak the message
segoddnja
pushed a commit
to segoddnja/react
that referenced
this issue
Aug 1, 2018
…book#13131)
* [facebook#13130] Add a more helpful message when passing an element to createElement()
* better conditional flow
* update after review
* move last condition inside last else clause
* Added test case
* compare 25132typeof to REACT_ELEMENT_TYPE
* runs prettier
* remove unrelated changes
* Tweak the message
This:
doesn't currently give a distinguishable message.
https://stackoverflow.com/questions/51110436/wrapping-provider-in-same-component-throws-element-type-is-invalid-expected-a-s
But we can easily detect it by checking for
$$typeof
and in that case suggest something more concrete (e.g. "Did you accidentally export JSX instead of a component?").The text was updated successfully, but these errors were encountered: