react-select 与 React 16 兼容吗?

react-select compatible with React 16?

我正在尝试将 react-select v1.0.0-rc.9 与 react v16.0.0 一起使用。这两个应该一起工作吗?仅按照 Github 中的简单示例,我得到了这个错误:

事实上,v1.0.0-rc.9 版本的 react-select 不适用于 React 16,因为从版本 16 开始,React 需要从 prop-types 包中导入 PropTypes (有关详细信息,请参阅 https://reactjs.org/docs/typechecking-with-proptypes.html

修复已合并并在版本 v2.0.0-alpha.2 中可用: https://github.com/JedWatson/react-select/commit/8ff4596259ab4a42df95185729a35599313e571e