-
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
[0.26.1] _reactNative2.default.createElement is not a function #7722
Comments
You probably need to fix your imports: import React from 'react';
import ReactNative from 'react-native'; This is so you run React.createElement instead of ReactNative.createElement, which doesn't exist. |
@seanfuture Please don't say such things. We've listed this in the release notes and also listed a codemod which you can use to migrate your project automatically - https://github.com/facebook/react-native/releases/tag/v0.25.1 We've valid reasons for doing so and have no intention to break anyone's code. But React Native is a moving target and breakage is unavoidable. |
Fair enough - Just pointing out how incredibly impactful this breaking change was .. Please be more careful regarding the core product. |
The awesome thing would be to have a bit more specific warning maybe ? I had a really weird error talking about Babel or something when I forgot to update some of my components |
If u wanna upgrade you should read the release notes, there is all the breaking changes that u need to take in consideration. The breaking changes are necessary to move faster |
@adrienthiery We had the warning in 0.25. It was removed completely in 0.26. But maybe we should have kept the warning for 2-3 releases before removing it completely. |
Such is the nature of working with anything under heavy and active development. It'll be good for us all in the long run. Better now than much further down the line. |
I submitted a PR which will show a better error message. Hope it helps. |
my project is web-react use webpack package get a error createElement is not a function , i dont konw how to do it. |
I also can't run the project.
I'm getting this red screen error on start:
This is weird because it's happening in the render method of index.ios.js which looks like this:
TheAppComponent is exported like so:
export default connect((state) => (state))(WhasomeMobile);
I've gone through and updated my project to include Component and PropTypes from React and even went through all of the third party dependencies that haven't done so yet. I've also done
react-native upgrade
andrnpm upgrade
and nothing helps.The string
_reactNative2.default.createElement
doesn't even exist anywhere in my project.I've spent a day and a half on this already. Any ideas?
The text was updated successfully, but these errors were encountered: