Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 396 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 396 Bytes

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