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

Function updateCoroutineComponent

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

Source from the content-addressed store, hash-verified

7418// We will invalidate the child context in finishClassComponent() right after rendering.
7419var hasContext=pushContextProvider$1(workInProgress);adoptClassInstance(workInProgress,value);mountClassInstance(workInProgress,priorityLevel);return finishClassComponent(current,workInProgress,true,hasContext);}else{// Proceed under the assumption that this is a functional component
7420workInProgress.tag=FunctionalComponent$1;{var Component=workInProgress.type;if(Component){warning$23(!Component.childContextTypes,'%s(...): childContextTypes cannot be defined on a functional component.',Component.displayName||Component.name||'Component');}if(workInProgress.ref!==null){var info='';var ownerName=ReactDebugCurrentFiber$4.getCurrentFiberOwnerName();if(ownerName){info+='\n\nCheck the render method of `'+ownerName+'`.';}var warningKey=ownerName||workInProgress._debugID||'';var debugSource=workInProgress._debugSource;if(debugSource){warningKey=debugSource.fileName+':'+debugSource.lineNumber;}if(!warnedAboutStatelessRefs[warningKey]){warnedAboutStatelessRefs[warningKey]=true;warning$23(false,'Stateless function components cannot be given refs. '+'Attempts to access this ref will fail.%s%s',info,ReactDebugCurrentFiber$4.getCurrentFiberStackAddendum());}}}reconcileChildren(current,workInProgress,value);memoizeProps(workInProgress,props);return workInProgress.child;}}function updateCoroutineComponent(current,workInProgress){var nextCoroutine=workInProgress.pendingProps;if(hasContextChanged$1()){// Normally we can bail out on props equality but if context has changed
7421// we don't do the bailout and we have to reuse existing props instead.
7422if(nextCoroutine===null){nextCoroutine=current&&current.memoizedProps;!(nextCoroutine!==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(nextCoroutine===null||workInProgress.memoizedProps===nextCoroutine){nextCoroutine=workInProgress.memoizedProps;// TODO: When bailing out, we might need to return the stateNode instead
7423// of the child. To check it for work.
7424// return bailoutOnAlreadyFinishedWork(current, workInProgress);
7425}var nextChildren=nextCoroutine.children;var priorityLevel=workInProgress.pendingWorkPriority;// The following is a fork of reconcileChildrenAtPriority but using
7426// stateNode to store the child.
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

Callers 1

beginWorkFunction · 0.85

Calls 3

reconcileChildFibersFunction · 0.85
memoizePropsFunction · 0.85
invariantFunction · 0.70

Tested by

no test coverage detected