prop-types-elementtype

PropTypes for elementType until merged in official

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
prop-types-elementtype
1.0.05 years ago5 years agoMinified + gzip package size for prop-types-elementtype in KB

Readme

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
};