It is deprecated after React version 15.5. Therefore, you need to install it separately.,
Install: npm install prop-types
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, };
Change You need to get an updated add-in package compatible with the latest latest updates. This package has not yet been updated, you can make changes to it ypurself.
source share