prop-types-elementtype

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i prop-types-elementtype

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

3.07 kB

Total Files

5

Last publish

Collaborators

  • exon