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

Function appendAllChildren

code/third-party/public/app.js:9863–9891  ·  view source on GitHub ↗
(parent, workInProgress)

Source from the content-addressed store, hash-verified

9861 }
9862
9863 function appendAllChildren(parent, workInProgress) {
9864 // We only have the top Fiber that was created but we need recurse down its
9865 // children to find all the terminal nodes.
9866 var node = workInProgress.child;
9867 while (node !== null) {
9868 if (node.tag === HostComponent || node.tag === HostText) {
9869 appendInitialChild(parent, node.stateNode);
9870 } else if (node.tag === HostPortal) {
9871 // If we have a portal child, then we don't want to traverse
9872 // down its children. Instead, we'll get insertions from each child in
9873 // the portal directly.
9874 } else if (node.child !== null) {
9875 node.child['return'] = node;
9876 node = node.child;
9877 continue;
9878 }
9879 if (node === workInProgress) {
9880 return;
9881 }
9882 while (node.sibling === null) {
9883 if (node['return'] === null || node['return'] === workInProgress) {
9884 return;
9885 }
9886 node = node['return'];
9887 }
9888 node.sibling['return'] = node['return'];
9889 node = node.sibling;
9890 }
9891 }
9892
9893 var updateHostContainer = void 0;
9894 var updateHostComponent = void 0;

Callers 2

ReactFiberCompleteWorkFunction · 0.70
completeWorkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected