In the code above, PropTypes.string is a type property for a string class. The property specifies the type of data that this object represents. The required property indicates that this object must be provided in order to use the object. The restriction property specifies specific restrictions on the data that this object can contain.
import PropTypes from 'prop-types'; PropTypes.string