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

Function renderRootConcurrent

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

Source from the content-addressed store, hash-verified

14253 for (; null !== workInProgress; ) performUnitOfWork(workInProgress);
14254}
14255function renderRootConcurrent(root, lanes) {
14256 var prevExecutionContext = executionContext;
14257 executionContext |= 2;
14258 var prevDispatcher = pushDispatcher(),
14259 prevAsyncDispatcher = pushAsyncDispatcher();
14260 workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes
14261 ? ((workInProgressTransitions = null),
14262 (workInProgressRootRenderTargetTime = now() + 500),
14263 prepareFreshStack(root, lanes))
14264 : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering(
14265 root,
14266 lanes
14267 ));
14268 a: do
14269 try {
14270 if (0 !== workInProgressSuspendedReason && null !== workInProgress) {
14271 lanes = workInProgress;
14272 var thrownValue = workInProgressThrownValue;
14273 b: switch (workInProgressSuspendedReason) {
14274 case 1:
14275 workInProgressSuspendedReason = 0;
14276 workInProgressThrownValue = null;
14277 throwAndUnwindWorkLoop(root, lanes, thrownValue, 1);
14278 break;
14279 case 2:
14280 if (isThenableResolved(thrownValue)) {
14281 workInProgressSuspendedReason = 0;
14282 workInProgressThrownValue = null;
14283 replaySuspendedUnitOfWork(lanes);
14284 break;
14285 }
14286 lanes = function () {
14287 2 === workInProgressSuspendedReason &&
14288 workInProgressRoot === root &&
14289 (workInProgressSuspendedReason = 7);
14290 ensureRootIsScheduled(root);
14291 };
14292 thrownValue.then(lanes, lanes);
14293 break a;
14294 case 3:
14295 workInProgressSuspendedReason = 7;
14296 break a;
14297 case 4:
14298 workInProgressSuspendedReason = 5;
14299 break a;
14300 case 7:
14301 isThenableResolved(thrownValue)
14302 ? ((workInProgressSuspendedReason = 0),
14303 (workInProgressThrownValue = null),
14304 replaySuspendedUnitOfWork(lanes))
14305 : ((workInProgressSuspendedReason = 0),
14306 (workInProgressThrownValue = null),
14307 throwAndUnwindWorkLoop(root, lanes, thrownValue, 7));
14308 break;
14309 case 5:
14310 var resource = null;
14311 switch (workInProgress.tag) {
14312 case 26:

Callers 1

performWorkOnRootFunction · 0.85

Calls 15

pushDispatcherFunction · 0.85
pushAsyncDispatcherFunction · 0.85
prepareFreshStackFunction · 0.85
throwAndUnwindWorkLoopFunction · 0.85
isThenableResolvedFunction · 0.85
ensureRootIsScheduledFunction · 0.85
preloadResourceFunction · 0.85
completeUnitOfWorkFunction · 0.85
resetWorkInProgressStackFunction · 0.85
formatProdErrorMessageFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…