This package has been deprecated

Author message:

This project is no longer being maintained. I'd recommend using childrenOfType from the airbnb-prop-types package instead.

react-component-of

2.0.0 • Public • Published

componentOf()

Custom prop type validator for checking React component types.

Example

import componentOf from 'react-component-of';
import Button from './Button';

const ButtonGroup = ({children}) => (
    <div className="ButtonGroup">
        {children}
    </div>
);

ButtonGroup.propTypes = {
  children: componentOf([Button]).isRequired
};

export default ButtonGroup;

Package Sidebar

Install

npm i react-component-of

Weekly Downloads

0

Version

2.0.0

License

MIT

Last publish

Collaborators

  • jacobbuck