-
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
undefined is not an object evaluating ReactPropTypes.string #14590
Comments
Maybe you can check this https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html |
the same problem here. Anybody has fixed the problem? |
After version 15.5 you have to import PropTypes from prop-types like below: import React from 'react'; class Component extends React.Component { {this.props.text} ;} } Component.propTypes = { |
@cromasystem yes it works thanks. i have replaced React.PropTypes with PropTypes |
@cromasystem do i have to do this for every component? |
good quest @elvismercado |
worked for me !! Thanks |
import PropTypes from 'prop-types'; |
use |
Version 15.5 of React Native changes how PropTypes are imported. Old: const { PropTypes, } = React; New: import PropTypes from 'prop-types'; Without this fix you will receive the red screen error message "undefined is not an object evaluating ReactPropTypes.string". Explanation here: facebook/react-native#14590
what specific module or file did you change?? going nuts.. doing this... |
@Shazam14 you will have to make the change in both your modules and those modules of the libraries you have declared in your package.json. There's a lot of pull requests waiting to merge these fixes into various libraries that I've run into, but until those are merged and packaged for deployment, you will have to make the temporary fix yourself. For instance, you will need to change:
|
react-native run-android,then
error
undefined is not an object evaluating ReactPropTypes.string
The text was updated successfully, but these errors were encountered: