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

Function updatePortalComponent

bundle.js:7429–7436  ·  view source on GitHub ↗
(current,workInProgress)

Source from the content-addressed store, hash-verified

7427if(current===null){workInProgress.stateNode=mountChildFibersInPlace(workInProgress,workInProgress.stateNode,nextChildren,priorityLevel);}else if(current.child===workInProgress.child){workInProgress.stateNode=reconcileChildFibers(workInProgress,workInProgress.stateNode,nextChildren,priorityLevel);}else{workInProgress.stateNode=reconcileChildFibersInPlace(workInProgress,workInProgress.stateNode,nextChildren,priorityLevel);}memoizeProps(workInProgress,nextCoroutine);// This doesn't take arbitrary time so we could synchronously just begin
7428// eagerly do the work of workInProgress.child as an optimization.
7429return workInProgress.stateNode;}function updatePortalComponent(current,workInProgress){pushHostContainer(workInProgress,workInProgress.stateNode.containerInfo);var priorityLevel=workInProgress.pendingWorkPriority;var nextChildren=workInProgress.pendingProps;if(hasContextChanged$1()){// Normally we can bail out on props equality but if context has changed
7430// we don't do the bailout and we have to reuse existing props instead.
7431if(nextChildren===null){nextChildren=current&&current.memoizedProps;!(nextChildren!=null)?invariant(false,'We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.'):void 0;}}else if(nextChildren===null||workInProgress.memoizedProps===nextChildren){return bailoutOnAlreadyFinishedWork(current,workInProgress);}if(current===null){// Portals are special because we don't append the children during mount
7432// but at commit. Therefore we need to track insertions which the normal
7433// flow doesn't do during mount. This doesn't happen at the root because
7434// the root always starts with a "current" with a null child.
7435// TODO: Consider unifying this with how the root works.
7436workInProgress.child=reconcileChildFibersInPlace(workInProgress,workInProgress.child,nextChildren,priorityLevel);memoizeProps(workInProgress,nextChildren);}else{reconcileChildren(current,workInProgress,nextChildren);memoizeProps(workInProgress,nextChildren);}return workInProgress.child;}/*
7437 function reuseChildrenEffects(returnFiber : Fiber, firstChild : Fiber) {
7438 let child = firstChild;
7439 do {

Callers 1

beginWorkFunction · 0.85

Calls 5

pushHostContainerFunction · 0.85
memoizePropsFunction · 0.85
reconcileChildrenFunction · 0.85
invariantFunction · 0.70

Tested by

no test coverage detected