Open audetcameron opened 3 years ago
https://reactjs.org/docs/typechecking-with-proptypes.html "Note: React.PropTypes has moved into a different package since React v15.5. Please use the prop-types library instead."
The new syntax is
import React from 'react'; import PropTypes from 'prop-types'; // ES6 const Component = ({ className }) => { return ( ); }; Component.displayName = 'Component'; Component.propTypes = { className: PropTypes.string, }; export default Component;
the package renders
import React, { PropTypes } from 'react'; const Component = ({ className }) => { return ( ); }; Component.displayName = 'Component'; Component.propTypes = { className: PropTypes.string, }; export default Component;
which will throw an error on prop-types.
Would it be worth adding another generator schema for this new syntax?
https://reactjs.org/docs/typechecking-with-proptypes.html "Note: React.PropTypes has moved into a different package since React v15.5. Please use the prop-types library instead."
The new syntax is
the package renders
which will throw an error on prop-types.
Would it be worth adding another generator schema for this new syntax?