For example, when react releases a new version, it may require two new versions, one containing deleted content, and the other not included
https://github.com/facebook/prop-types/issues/128
https://github.com/facebook/react-native/issues/16442
The separate prop-types package is the way that React has chosen to do this; React.PropTypes was deprecated in v15.5, I think, and prop-types works back to 0.13.
It's better to have a very good version of compatibility, and it includes newest functionality. I know, maybe it's not easy.Let the user decide which one to use.
Because any dependency has not been updated, I have to use the old version of react, and of course, react-native can't use the latest version. It's very painful
You can run a codemod to convert the old pattern to the new one:
Please run the codemod to convert your code. I hope the links above help.
Thanks @gaearon I ran
jscodeshift -t react-codemod/transforms/React-PropTypes-to-prop-types.js <path> on my project and it resolved the issue.
@gaearon hey can you pls tel me, here (path) refers which path?