Closed avantcontra closed 7 years ago
Hi, any plan to fix the warning with React 15.5.0:
Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead
https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html
In 15.5, instead of accessing PropTypes from the main React object, install the prop-types package and import them from there:
// Before (15.4 and below) import React from 'react'; class Component extends React.Component { render() { return <div>{this.props.text}</div>; } } Component.propTypes = { text: React.PropTypes.string.isRequired, } // After (15.5) import React from 'react'; import PropTypes from 'prop-types'; class Component extends React.Component { render() { return <div>{this.props.text}</div>; } } Component.propTypes = { text: PropTypes.string.isRequired, };
Thanks, I can get to it on Monday, or I can take a PR if anyone is free until then.
I'll leave this if anyone wants to PR, should be an easy fix :)
Fixed v4.1.0
Hi, any plan to fix the warning with React 15.5.0:
Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead
https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html
In 15.5, instead of accessing PropTypes from the main React object, install the prop-types package and import them from there: