MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / getHostParentFiber

Function getHostParentFiber

code/communication/public/app.js:11636–11645  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

11634
11635
11636 function getHostParentFiber(fiber) {
11637 var parent = fiber['return'];
11638 while (parent !== null) {
11639 if (isHostParent(parent)) {
11640 return parent;
11641 }
11642 parent = parent['return'];
11643 }
11644 invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.');
11645 }
11646
11647 function isHostParent(fiber) {
11648 return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;

Callers 1

commitPlacementFunction · 0.70

Calls 2

isHostParentFunction · 0.70
invariantFunction · 0.70

Tested by

no test coverage detected