MCPcopy Create free account
hub / github.com/caseywebdev/react-list / describeAncestors

Function describeAncestors

docs/index.js:20941–20955  ·  view source on GitHub ↗
(ancestor, child, props)

Source from the content-addressed store, hash-verified

20939 }
20940 }
20941 function describeAncestors(ancestor, child, props) {
20942 for (var fiber = child, node = null, distanceFromLeaf = 0; fiber; )
20943 fiber === ancestor && (distanceFromLeaf = 0),
20944 (node = {
20945 fiber: fiber,
20946 children: null !== node ? [node] : [],
20947 serverProps:
20948 fiber === child ? props : fiber === ancestor ? null : void 0,
20949 serverTail: [],
20950 distanceFromLeaf: distanceFromLeaf
20951 }),
20952 distanceFromLeaf++,
20953 (fiber = fiber.return);
20954 return null !== node ? describeDiff(node).replaceAll(/^[+-]/gm, ">") : "";
20955 }
20956 function updatedAncestorInfoDev(oldInfo, tag) {
20957 oldInfo = assign({}, oldInfo || emptyAncestorInfoDev);
20958 var info = { tag: tag };

Callers 2

validateDOMNestingFunction · 0.85
validateTextNestingFunction · 0.85

Calls 1

describeDiffFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…