MCPcopy Create free account
hub / github.com/Lobos/react-ui / getInstanceFromNode

Function getInstanceFromNode

docs/lib/react.js:7397–7404  ·  view source on GitHub ↗

* Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent * instance, or null if the node was not rendered by this React.

(node)

Source from the content-addressed store, hash-verified

7395 * instance, or null if the node was not rendered by this React.
7396 */
7397function getInstanceFromNode(node) {
7398 var inst = getClosestInstanceFromNode(node);
7399 if (inst != null && inst._nativeNode === node) {
7400 return inst;
7401 } else {
7402 return null;
7403 }
7404}
7405
7406/**
7407 * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…