-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[Packager] require('react-native') must be assigned to React #1479
Comments
👍 |
After some digging I found that JSX transformer is the root cause. Here's an example: var Test = require('react-native');
...
render() {
return (
<View></View>
);
} is compiles into return (
React.createElement(View, null)
); even though I required |
@brentvatne I don't have any! I wish I had one! ;) |
We don't intend to support this in the JSX transformer, sorry. We require that you have |
By accident I have assigned require('react-native') to a variable other than
React
and It failed to execute. hmmm...This code works fine
By this one doesn't
Here's what I got as an error:
The text was updated successfully, but these errors were encountered: