0
0
llucycodes42
= function() {
return this.type === "string";
};
This code associates the "string" type with the isRequired function and ensures that the function will be run when the type is "string".
Library: react
Shortcut: ptsr
import PropTypes from 'prop-types';
PropTypes.string.isRequired