React: The latest version of react deleted content, such as'prop-types', can be provided to allow users to decide whether to delete or contain these contents

Created on 19 Oct 2017  路  7Comments  路  Source: facebook/react

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

All 7 comments

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

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?

Was this page helpful?
0 / 5 - 0 ratings