PropTypes.elementType
PropTypes for React element types.
You can use this library until this PR is merged in the official PropTypes
.
npm install prop-types-elementtype
or
yarn add prop-types-elementtype
Usage
;; const MyComponent = <div>Hello there!</div>; const MyWrapper = <Welcomer />;MyWrapperpropTypes = welcomer: elementType;