react-children-proptype

2.0.0 • Public • Published

react-children-proptype

This is a simple package for validating React children.

Installation

npm install --save react-children-proptype

Example

import childrenPropType from 'react-children-proptype';
 
const MyComponent = ({children}) => (
  <div>
    <h1>My Component</h1>
    {children}
  </div>
);
 
MyComponent.propTypes = {
  children: childrenPropType,
};

Readme

Keywords

Package Sidebar

Install

npm i react-children-proptype

Weekly Downloads

1

Version

2.0.0

License

MIT

Last publish

Collaborators

  • sgnh