https://github.com/sgnh/react-children-proptype
This is a simple package for validating React children
https://github.com/sgnh/react-children-proptype
javascript npm props proptype-validators proptypes react
Last synced: about 1 month ago
JSON representation
This is a simple package for validating React children
- Host: GitHub
- URL: https://github.com/sgnh/react-children-proptype
- Owner: sgnh
- License: mit
- Created: 2017-03-07T10:43:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-08T00:19:13.000Z (about 9 years ago)
- Last Synced: 2025-08-13T07:29:51.792Z (10 months ago)
- Topics: javascript, npm, props, proptype-validators, proptypes, react
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/react-children-proptype
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# react-children-proptype
This is a simple package for validating React children.
## Installation
```
npm install --save react-children-proptype
```
## Example
```javascript
import childrenPropType from 'react-children-proptype';
const MyComponent = ({children}) => (
My Component
{children}
);
MyComponent.propTypes = {
children: childrenPropType,
};
```