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

Function beginWork

bundle.js:7473–7477  ·  view source on GitHub ↗
(current,workInProgress,priorityLevel)

Source from the content-addressed store, hash-verified

7471function memoizeProps(workInProgress,nextProps){workInProgress.memoizedProps=nextProps;}function memoizeState(workInProgress,nextState){workInProgress.memoizedState=nextState;// Don't reset the updateQueue, in case there are pending updates. Resetting
7472// is handled by beginUpdateQueue.
7473}function beginWork(current,workInProgress,priorityLevel){if(workInProgress.pendingWorkPriority===NoWork$3||workInProgress.pendingWorkPriority>priorityLevel){return bailoutOnLowPriority(current,workInProgress);}{ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress,null);}switch(workInProgress.tag){case IndeterminateComponent$2:return mountIndeterminateComponent(current,workInProgress,priorityLevel);case FunctionalComponent$1:return updateFunctionalComponent(current,workInProgress);case ClassComponent$6:return updateClassComponent(current,workInProgress,priorityLevel);case HostRoot$7:return updateHostRoot(current,workInProgress,priorityLevel);case HostComponent$7:return updateHostComponent(current,workInProgress,priorityLevel);case HostText$4:return updateHostText(current,workInProgress);case CoroutineHandlerPhase:// This is a restart. Reset the tag to the initial phase.
7474workInProgress.tag=CoroutineComponent$1;// Intentionally fall through since this is now the same.
7475case CoroutineComponent$1:return updateCoroutineComponent(current,workInProgress);case YieldComponent$2:// A yield component is just a placeholder, we can just run through the
7476// next one immediately.
7477return null;case HostPortal$4:return updatePortalComponent(current,workInProgress);case Fragment$2:return updateFragment(current,workInProgress);default:invariant(false,'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');}}function beginFailedWork(current,workInProgress,priorityLevel){// Push context providers here to avoid a push/pop context mismatch.
7478switch(workInProgress.tag){case ClassComponent$6:pushContextProvider$1(workInProgress);break;case HostRoot$7:pushHostRootContext(workInProgress);break;default:invariant(false,'Invalid type of work. This error is likely caused by a bug in React. Please file an issue.');}// Add an error effect so we can handle the error during the commit phase
7479workInProgress.effectTag|=Err$1;// This is a weird case where we do "resume" work — work that failed on
7480// our first attempt. Because we no longer have a notion of "progressed

Callers 1

performUnitOfWorkFunction · 0.85

Calls 11

bailoutOnLowPriorityFunction · 0.85
updateClassComponentFunction · 0.85
updateHostRootFunction · 0.85
updateHostComponentFunction · 0.85
updateHostTextFunction · 0.85
updateCoroutineComponentFunction · 0.85
updatePortalComponentFunction · 0.85
updateFragmentFunction · 0.85
invariantFunction · 0.70

Tested by

no test coverage detected