React 15.5 moved PropTypes to separate package
Opened this issue · 0 comments
kengorab commented
In versions of React newer than 15.5, PropTypes
is no longer exported and has been moved to the prop-types
package. Details here: https://reactjs.org/blog/2017/09/26/react-v16.0.html#packaging
The fix for this should be simple: add the prop-types
package as a dependency (as is recommended by their docs) and do
import PropTypes from 'prop-types'
rather than
import { PropTypes } from 'react'