MCPcopy Create free account
hub / github.com/plotly/dash / prepareFreshStack

Function prepareFreshStack

dash/deps/react-dom@18.3.1.js:26269–26310  ·  view source on GitHub ↗
(root, lanes)

Source from the content-addressed store, hash-verified

26267 }
26268
26269 function prepareFreshStack(root, lanes) {
26270 root.finishedWork = null;
26271 root.finishedLanes = NoLanes;
26272 var timeoutHandle = root.timeoutHandle;
26273
26274 if (timeoutHandle !== noTimeout) {
26275 // The root previous suspended and scheduled a timeout to commit a fallback
26276 // state. Now that we have additional work, cancel the timeout.
26277 root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
26278
26279 cancelTimeout(timeoutHandle);
26280 }
26281
26282 if (workInProgress !== null) {
26283 var interruptedWork = workInProgress.return;
26284
26285 while (interruptedWork !== null) {
26286 var current = interruptedWork.alternate;
26287 unwindInterruptedWork(current, interruptedWork);
26288 interruptedWork = interruptedWork.return;
26289 }
26290 }
26291
26292 workInProgressRoot = root;
26293 var rootWorkInProgress = createWorkInProgress(root.current, null);
26294 workInProgress = rootWorkInProgress;
26295 workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;
26296 workInProgressRootExitStatus = RootInProgress;
26297 workInProgressRootFatalError = null;
26298 workInProgressRootSkippedLanes = NoLanes;
26299 workInProgressRootInterleavedUpdatedLanes = NoLanes;
26300 workInProgressRootPingedLanes = NoLanes;
26301 workInProgressRootConcurrentErrors = null;
26302 workInProgressRootRecoverableErrors = null;
26303 finishQueueingConcurrentUpdates();
26304
26305 {
26306 ReactStrictModeWarnings.discardPendingWarnings();
26307 }
26308
26309 return rootWorkInProgress;
26310 }
26311
26312 function handleError(root, thrownValue) {
26313 do {

Callers 6

performSyncWorkOnRootFunction · 0.70
renderRootSyncFunction · 0.70
renderRootConcurrentFunction · 0.70
pingSuspendedRootFunction · 0.70

Calls 3

unwindInterruptedWorkFunction · 0.70
createWorkInProgressFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…