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

Function appendAllChildren

code/higher-order-components/public/app.js:10624–10652  ·  view source on GitHub ↗
(parent, workInProgress)

Source from the content-addressed store, hash-verified

10622 }
10623
10624 function appendAllChildren(parent, workInProgress) {
10625 // We only have the top Fiber that was created but we need recurse down its
10626 // children to find all the terminal nodes.
10627 var node = workInProgress.child;
10628 while (node !== null) {
10629 if (node.tag === HostComponent || node.tag === HostText) {
10630 appendInitialChild(parent, node.stateNode);
10631 } else if (node.tag === HostPortal) {
10632 // If we have a portal child, then we don't want to traverse
10633 // down its children. Instead, we'll get insertions from each child in
10634 // the portal directly.
10635 } else if (node.child !== null) {
10636 node.child['return'] = node;
10637 node = node.child;
10638 continue;
10639 }
10640 if (node === workInProgress) {
10641 return;
10642 }
10643 while (node.sibling === null) {
10644 if (node['return'] === null || node['return'] === workInProgress) {
10645 return;
10646 }
10647 node = node['return'];
10648 }
10649 node.sibling['return'] = node['return'];
10650 node = node.sibling;
10651 }
10652 }
10653
10654 var updateHostContainer = void 0;
10655 var updateHostComponent = void 0;

Callers 2

ReactFiberCompleteWorkFunction · 0.70
completeWorkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected