React PropTypes for props-elements
npm install react-element-proptypes```
npm install --save react-element-proptypes
`js
const ElementPropTypes = require('react-element-proptypes');
const Modal = ({ header, items }) => (
Modal.propTypes = {
header: ElementPropTypes.elementOfType(Header).isRequired,
items: React.PropTypes.arrayOf(ElementPropTypes.elementOfType(Item))
};
// render Modal
React.render(
items={[
]}
/>,
rootElement
);
``
checks the type of a React element