MCPcopy Create free account
hub / github.com/danielstocks/react-sortable / appendAllChildren

Function appendAllChildren

bundle.js:7499–7504  ·  view source on GitHub ↗
(parent,workInProgress)

Source from the content-addressed store, hash-verified

7497// TODO: Compare this to a generator or opaque helpers like Children.
7498var yields=[];appendAllYields(yields,workInProgress);var fn=coroutine.handler;var props=coroutine.props;var nextChildren=fn(props,yields);var currentFirstChild=current!==null?current.child:null;// Inherit the priority of the returnFiber.
7499var priority=workInProgress.pendingWorkPriority;workInProgress.child=reconcileChildFibers$2(workInProgress,currentFirstChild,nextChildren,priority);return workInProgress.child;}function appendAllChildren(parent,workInProgress){// We only have the top Fiber that was created but we need recurse down its
7500// children to find all the terminal nodes.
7501var node=workInProgress.child;while(node!==null){if(node.tag===HostComponent$8||node.tag===HostText$6){appendInitialChild(parent,node.stateNode);}else if(node.tag===HostPortal$6){// If we have a portal child, then we don't want to traverse
7502// down its children. Instead, we'll get insertions from each child in
7503// the portal directly.
7504}else if(node.child!==null){node=node.child;continue;}if(node===workInProgress){return;}while(node.sibling===null){if(node['return']===null||node['return']===workInProgress){return;}node=node['return'];}node=node.sibling;}}function completeWork(current,workInProgress,renderPriority){{ReactDebugCurrentFiber$5.setCurrentFiber(workInProgress,null);}// Get the latest props.
7505var newProps=workInProgress.pendingProps;if(newProps===null){newProps=workInProgress.memoizedProps;}else if(workInProgress.pendingWorkPriority!==OffscreenPriority$2||renderPriority===OffscreenPriority$2){// Reset the pending props, unless this was a down-prioritization.
7506workInProgress.pendingProps=null;}switch(workInProgress.tag){case FunctionalComponent$3:return null;case ClassComponent$8:{// We are leaving this subtree, so pop context if any.
7507popContextProvider$2(workInProgress);return null;}case HostRoot$8:{popHostContainer(workInProgress);popTopLevelContextObject$1(workInProgress);var fiberRoot=workInProgress.stateNode;if(fiberRoot.pendingContext){fiberRoot.context=fiberRoot.pendingContext;fiberRoot.pendingContext=null;}if(current===null||current.child===null){// If we hydrated, pop so that we can delete any remaining children

Callers 1

completeWorkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected