MCPcopy Index your code
hub / github.com/caseywebdev/react-list / renderRootSync

Function renderRootSync

docs/index.js:14192–14251  ·  view source on GitHub ↗
(root, lanes, shouldYieldForPrerendering)

Source from the content-addressed store, hash-verified

14190 );
14191}
14192function renderRootSync(root, lanes, shouldYieldForPrerendering) {
14193 var prevExecutionContext = executionContext;
14194 executionContext |= 2;
14195 var prevDispatcher = pushDispatcher(),
14196 prevAsyncDispatcher = pushAsyncDispatcher();
14197 if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes)
14198 (workInProgressTransitions = null), prepareFreshStack(root, lanes);
14199 lanes = !1;
14200 var exitStatus = workInProgressRootExitStatus;
14201 a: do
14202 try {
14203 if (0 !== workInProgressSuspendedReason && null !== workInProgress) {
14204 var unitOfWork = workInProgress,
14205 thrownValue = workInProgressThrownValue;
14206 switch (workInProgressSuspendedReason) {
14207 case 8:
14208 resetWorkInProgressStack();
14209 exitStatus = 6;
14210 break a;
14211 case 3:
14212 case 2:
14213 case 6:
14214 null === suspenseHandlerStackCursor.current && (lanes = !0);
14215 var reason = workInProgressSuspendedReason;
14216 workInProgressSuspendedReason = 0;
14217 workInProgressThrownValue = null;
14218 throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);
14219 if (
14220 shouldYieldForPrerendering &&
14221 workInProgressRootIsPrerendering
14222 ) {
14223 exitStatus = 0;
14224 break a;
14225 }
14226 break;
14227 default:
14228 (reason = workInProgressSuspendedReason),
14229 (workInProgressSuspendedReason = 0),
14230 (workInProgressThrownValue = null),
14231 throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);
14232 }
14233 }
14234 workLoopSync();
14235 exitStatus = workInProgressRootExitStatus;
14236 break;
14237 } catch (thrownValue$164) {
14238 handleThrow(root, thrownValue$164);
14239 }
14240 while (1);
14241 lanes && root.shellSuspendCounter++;
14242 lastContextDependency = currentlyRenderingFiber = null;
14243 executionContext = prevExecutionContext;
14244 ReactSharedInternals.H = prevDispatcher;
14245 ReactSharedInternals.A = prevAsyncDispatcher;
14246 null === workInProgress &&
14247 ((workInProgressRoot = null),
14248 (workInProgressRootRenderLanes = 0),
14249 finishQueueingConcurrentUpdates());

Callers 1

performWorkOnRootFunction · 0.85

Calls 13

pushDispatcherFunction · 0.85
pushAsyncDispatcherFunction · 0.85
prepareFreshStackFunction · 0.85
resetWorkInProgressStackFunction · 0.85
throwAndUnwindWorkLoopFunction · 0.85
workLoopSyncFunction · 0.85
handleThrowFunction · 0.85
restorePendingUpdatersFunction · 0.85
markRenderStartedFunction · 0.85
resetContextDependenciesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…