1.0.0 • Published 6 years ago
prop-types-elementtype v1.0.0
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
import React from 'react';
import elementType from 'prop-types-elementtype';
const MyComponent = () => <div>Hello there!</div>;
const MyWrapper = ({ welcomer: Welcomer }) => <Welcomer />;
MyWrapper.propTypes = {
welcomer: elementType
};
1.0.0
6 years ago