I have upgraded to the latest version of React/RN: "react": "^15.2.1", "react-native": "^0.30.0",
And I am starting to get a lot of warnings regarding the stylesheets. I am actually not using React.PropTypes validation for the style sheets, so why is throwing these warnings?
const styles = StyleSheet.create({ welcome: { fontSize: 20, textAlign: "center", margin: 10, },
ExceptionsManager.js:76 Warning: You are manually calling a React.PropTypes validation function for the
fontSize
prop onStyleSheet welcome
. This is deprecated and will not work in the next major version. You may be seeing this warning due to a third-party PropTypes library. See https://facebook.github.io/react/warnings/dont-call-proptypes.html for details.reactConsoleError @ExceptionsManager.js:76 Warning: You are manually calling a React.PropTypes validation function for the
textAlign
prop onStyleSheet welcome
. This is deprecated and will not work in the next major version. You may be seeing this warning due to a third-party PropTypes library. See https://facebook.github.io/react/warnings/dont-call-proptypes.htmlExceptionsManager.js:76 Warning: You are manually calling a React.PropTypes validation function for the
margin
prop onStyleSheet welcome
. This is deprecated and will not work in the next major version. You may be seeing this warning due to a third-party PropTypes library. See https://facebook.github.io/react/warnings/dont-call-proptypes.html for details.
React native 0.30 was dependent on react 15.2.0 not 15.2.1. So you should do rm -rf node_modules/react
, remove the react version from package.json, then npm install --save [email protected]
. This should do the trick.
I resolved the issue by changing versions (removing from node_modules and installing packages).
npm --save remove react react-native npm --save install [email protected] [email protected]
I didn't re-deploy native code. I was seeing the issues previously when using:
"react": "^15.3.0", "react-native": "^0.31.0"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With