MCPcopy Create free account
hub / github.com/Lucifier129/react-lite / getNode

Function getNode

examples/simple/react.js:10752–10757  ·  view source on GitHub ↗

* Finds the node with the supplied React-generated DOM ID. * * @param {string} id A React-generated DOM ID. * @return {DOMElement} DOM node with the suppled `id`. * @internal

(id)

Source from the content-addressed store, hash-verified

10750 * @internal
10751 */
10752function getNode(id) {
10753 if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) {
10754 nodeCache[id] = ReactMount.findReactNodeByID(id);
10755 }
10756 return nodeCache[id];
10757}
10758
10759/**
10760 * Finds the node with the supplied public React instance.

Callers

nothing calls this directly

Calls 1

isValidFunction · 0.85

Tested by

no test coverage detected