MCPcopy Create free account
hub / github.com/caseywebdev/react-list / prepareFreshStack

Function prepareFreshStack

docs/index.js:14095–14139  ·  view source on GitHub ↗
(root, lanes)

Source from the content-addressed store, hash-verified

14093 }
14094}
14095function prepareFreshStack(root, lanes) {
14096 root.finishedWork = null;
14097 root.finishedLanes = 0;
14098 var timeoutHandle = root.timeoutHandle;
14099 -1 !== timeoutHandle &&
14100 ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
14101 timeoutHandle = root.cancelPendingCommit;
14102 null !== timeoutHandle &&
14103 ((root.cancelPendingCommit = null), timeoutHandle());
14104 resetWorkInProgressStack();
14105 workInProgressRoot = root;
14106 workInProgress = timeoutHandle = createWorkInProgress(root.current, null);
14107 workInProgressRootRenderLanes = lanes;
14108 workInProgressSuspendedReason = 0;
14109 workInProgressThrownValue = null;
14110 workInProgressRootDidSkipSuspendedSiblings = !1;
14111 workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes);
14112 workInProgressRootDidAttachPingListener = !1;
14113 workInProgressSuspendedRetryLanes =
14114 workInProgressDeferredLane =
14115 workInProgressRootPingedLanes =
14116 workInProgressRootInterleavedUpdatedLanes =
14117 workInProgressRootSkippedLanes =
14118 workInProgressRootExitStatus =
14119 0;
14120 workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors =
14121 null;
14122 workInProgressRootDidIncludeRecursiveRenderUpdate = !1;
14123 0 !== (lanes & 8) && (lanes |= lanes & 32);
14124 var allEntangledLanes = root.entangledLanes;
14125 if (0 !== allEntangledLanes)
14126 for (
14127 root = root.entanglements, allEntangledLanes &= lanes;
14128 0 < allEntangledLanes;
14129
14130 ) {
14131 var index$4 = 31 - clz32(allEntangledLanes),
14132 lane = 1 << index$4;
14133 lanes |= root[index$4];
14134 allEntangledLanes &= ~lane;
14135 }
14136 entangledRenderLanes = lanes;
14137 finishQueueingConcurrentUpdates();
14138 return timeoutHandle;
14139}
14140function handleThrow(root, thrownValue) {
14141 currentlyRenderingFiber$1 = null;
14142 ReactSharedInternals.H = ContextOnlyDispatcher;

Callers 5

scheduleUpdateOnFiberFunction · 0.85
performWorkOnRootFunction · 0.85
renderRootSyncFunction · 0.85
renderRootConcurrentFunction · 0.85
pingSuspendedRootFunction · 0.85

Calls 4

resetWorkInProgressStackFunction · 0.85
createWorkInProgressFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…