react-modal icon indicating copy to clipboard operation
react-modal copied to clipboard

Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.

Open sizeight opened this issue 9 years ago • 3 comments

Summary:

In react 15.5, instead of accessing PropTypes from the main React object, install the prop-types package and import them from there:

sizeight avatar Apr 11 '17 11:04 sizeight

Ditto, getting this

miketheanimal avatar Apr 11 '17 21:04 miketheanimal

Fixed in v1.7.4

claydiffrient avatar Apr 13 '17 13:04 claydiffrient

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

aseem2625 avatar May 25 '17 15:05 aseem2625