-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
React Native only supports JSX #144
Comments
Can you try
cc @balpert |
Arggh .. ignore me, I'm being an idiot. This fails:
Where
|
The error message is still really bad. Would be nice to throw an exception along the lines of 'You tried to render the element 'Text' but it doesn't exist. You can only use string notation for lowercase components'. Want to submit a pull request that warns against this? It would prevent other people from failing into the same mistake |
We actually don't use or support string-typed components in React native at all. Would be nice to add a warning for non-lowercase components in React core though. |
I agree, the error message isn't great. As the react-native behaviour differs from react in this case, one option is to adapt the https://github.com/facebook/react-native/blob/master/Libraries/ReactIOS/ReactIOS.js#L32 What do you think? |
In neither case do uppercase tag names make sense, so we can add a warning in React core. We might also want to add some sort of warning for using any string type in React Native. |
Unless I am mistake, I should be able to substitute this:
With this:
However, the above causes the application to fail as follows:
The text was updated successfully, but these errors were encountered: