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

Function appendAllChildren

code/new-context-api/public/app.js:9991–10019  ·  view source on GitHub ↗
(parent, workInProgress)

Source from the content-addressed store, hash-verified

9989 }
9990
9991 function appendAllChildren(parent, workInProgress) {
9992 // We only have the top Fiber that was created but we need recurse down its
9993 // children to find all the terminal nodes.
9994 var node = workInProgress.child;
9995 while (node !== null) {
9996 if (node.tag === HostComponent || node.tag === HostText) {
9997 appendInitialChild(parent, node.stateNode);
9998 } else if (node.tag === HostPortal) {
9999 // If we have a portal child, then we don't want to traverse
10000 // down its children. Instead, we'll get insertions from each child in
10001 // the portal directly.
10002 } else if (node.child !== null) {
10003 node.child['return'] = node;
10004 node = node.child;
10005 continue;
10006 }
10007 if (node === workInProgress) {
10008 return;
10009 }
10010 while (node.sibling === null) {
10011 if (node['return'] === null || node['return'] === workInProgress) {
10012 return;
10013 }
10014 node = node['return'];
10015 }
10016 node.sibling['return'] = node['return'];
10017 node = node.sibling;
10018 }
10019 }
10020
10021 var updateHostContainer = void 0;
10022 var updateHostComponent = void 0;

Callers 2

ReactFiberCompleteWorkFunction · 0.70
completeWorkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected