Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 632 Bytes

README.md

File metadata and controls

10 lines (7 loc) · 632 Bytes

prop-types-dom

React PropTypes validators for DOM nodes.

- `domNode`: Ensure the prop has been supplied a DOM node, `undefined`, or `null`.
- `domNode.isRequired`: Ensure the prop has been supplied a DOM node or `null`.
- `domNodeOf(type: string)`: Ensure the prop has been supplied a DOM node with the specified HTML tag, `undefined`, or `null`.
- `domNodeOf(type: string).isRequired`: Ensure the prop has been supplied a DOM node with the specified HTML tag or `null`.

isRequired variants allow null to be provided in order to prevent warnings from being emitted during initial render when passing a ref.