findDOMNode.js 253 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 import ReactDOM from 'react-dom'; /** * Return if a node is a DOM node. Else will return by `findDOMNode` */ export default function findDOMNode(node) { if (node instanceof HTMLElement) { return node; } return ReactDOM.findDOMNode(node); }