In react 15.5, instead of accessing PropTypes from the main React object, install the prop-types package and import them from there:
Ditto, getting this
Fixed in v1.7.4
Strangely, I'm getting this error
Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead
even after having:
import PropTypes from 'prop-types';
and
Home.propTypes = {
increment: PropTypes.func,
count: PropTypes.number
};
Note: I'm having only 1 component in my project. So, that's not isssue.
Issue is linked to: Link
Most helpful comment
Strangely, I'm getting this error
Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm insteadeven after having:
and
Note: I'm having only 1 component in my project. So, that's not isssue.
Issue is linked to: Link