Accessing PropTypes via the main React package is deprecated
rafa-3l opened this issue · 0 comments
rafa-3l commented
Accessing PropTypes via the main React package throws a deprecation warning.
We should use the prop-types package from npm instead.
Instead of this:
User.propTypes = {
index: React.PropTypes.number.isRequired
}
We should use this:
import PropTypes from 'prop-types';
User.propTypes = {
index: PropTypes.number.isRequired
}