1.0.0 • Published 7 years ago
element-of-prop-type v1.0.0
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
};
...
}
1.0.0
7 years ago