MCPcopy Create free account
hub / github.com/react/react / containsNode

Function containsNode

packages/react-reconciler/src/ReactFiberScope.js:174–183  ·  view source on GitHub ↗
(this: $FlowFixMe, node: Object)

Source from the content-addressed store, hash-verified

172}
173
174function containsNode(this: $FlowFixMe, node: Object): boolean {
175 let fiber = getInstanceFromNode(node);
176 while (fiber !== null) {
177 if (fiber.tag === ScopeComponent && fiber.stateNode === this) {
178 return true;
179 }
180 fiber = fiber.return;
181 }
182 return false;
183}
184
185function getChildContextValues<T>(
186 this: $FlowFixMe,

Callers

nothing calls this directly

Calls 1

getInstanceFromNodeFunction · 0.90

Tested by

no test coverage detected