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

Function scheduleRoot

bundle.js:7917–7919  ·  view source on GitHub ↗
(root,priorityLevel)

Source from the content-addressed store, hash-verified

7915// boundary. We'll throw the first uncaught error once it's safe to
7916// do so, at the end of the batch.
7917firstUncaughtError=capturedError.error;}return;default:invariant(false,'Invalid type of work. This error is likely caused by a bug in React. Please file an issue.');}}function unwindContexts(from,to){var node=from;while(node!==null){switch(node.tag){case ClassComponent$5:popContextProvider$1(node);break;case HostComponent$6:popHostContext(node);break;case HostRoot$6:popHostContainer(node);break;case HostPortal$3:popHostContainer(node);break;}if(node===to||node.alternate===to){{stopFailedWorkTimer(node);}break;}else{stopWorkTimer(node);}node=node['return'];}}function scheduleRoot(root,priorityLevel){if(priorityLevel===NoWork$2){return;}if(!root.isScheduled){root.isScheduled=true;if(lastScheduledRoot){// Schedule ourselves to the end.
7918lastScheduledRoot.nextScheduledRoot=root;lastScheduledRoot=root;}else{// We're the only work scheduled.
7919nextScheduledRoot=root;lastScheduledRoot=root;}}}function scheduleUpdate(fiber,priorityLevel){return scheduleUpdateImpl(fiber,priorityLevel,false);}function scheduleUpdateImpl(fiber,priorityLevel,isErrorRecovery){{recordScheduleUpdate();}if(nestedUpdateCount>NESTED_UPDATE_LIMIT){didFatal=true;invariant(false,'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');}if(!isPerformingWork&&priorityLevel<=nextPriorityLevel){// We must reset the current unit of work pointer so that we restart the
7920// search from the root during the next tick, in case there is now higher
7921// priority work somewhere earlier than before.
7922nextUnitOfWork=null;}{if(!isErrorRecovery&&fiber.tag===ClassComponent$5){var instance=fiber.stateNode;warnAboutInvalidUpdates(instance);}}var node=fiber;var shouldContinue=true;while(node!==null&&shouldContinue){// Walk the parent path to the root and update each node's priority. Once

Callers 1

scheduleUpdateImplFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected