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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    14
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    14

Package Sidebar

Install

npm i prop-types-elementtype

Weekly Downloads

14

Version

1.0.0

License

MIT

Unpacked Size

3.07 kB

Total Files

5

Last publish

Collaborators

  • exon