MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / appendAllChildrenToContainer

Function appendAllChildrenToContainer

code/composition/public/app.js:10835–10863  ·  view source on GitHub ↗
(containerChildSet, workInProgress)

Source from the content-addressed store, hash-verified

10833 // An unfortunate fork of appendAllChildren because we have two different parent types.
10834
10835 var appendAllChildrenToContainer = function (containerChildSet, workInProgress) {
10836 // We only have the top Fiber that was created but we need recurse down its
10837 // children to find all the terminal nodes.
10838 var node = workInProgress.child;
10839 while (node !== null) {
10840 if (node.tag === HostComponent || node.tag === HostText) {
10841 appendChildToContainerChildSet(containerChildSet, node.stateNode);
10842 } else if (node.tag === HostPortal) {
10843 // If we have a portal child, then we don't want to traverse
10844 // down its children. Instead, we'll get insertions from each child in
10845 // the portal directly.
10846 } else if (node.child !== null) {
10847 node.child['return'] = node;
10848 node = node.child;
10849 continue;
10850 }
10851 if (node === workInProgress) {
10852 return;
10853 }
10854 while (node.sibling === null) {
10855 if (node['return'] === null || node['return'] === workInProgress) {
10856 return;
10857 }
10858 node = node['return'];
10859 }
10860 node.sibling['return'] = node['return'];
10861 node = node.sibling;
10862 }
10863 };
10864 updateHostContainer = function (workInProgress) {
10865 var portalOrRoot = workInProgress.stateNode;
10866 var childrenUnchanged = workInProgress.firstEffect === null;

Callers 1

ReactFiberCompleteWorkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected