Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

element-of-prop-type

pwmckenna4ISC1.0.0

Checks if the prop is a React element of a specific type

readme

element-of-prop-type

Checks if the prop is a React element of a specific type

usage

import elementOf from 'element-of-prop-type';

class MyComponent extends Component {
  static propTypes = {
    children: elementOf(MyChildComponent).isRequired
  };
  ...
}