MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / performUnitOfWork

Function performUnitOfWork

code/composition/public/app.js:13354–13387  ·  view source on GitHub ↗
(workInProgress)

Source from the content-addressed store, hash-verified

13352 }
13353
13354 function performUnitOfWork(workInProgress) {
13355 // The current, flushed, state of this fiber is the alternate.
13356 // Ideally nothing should rely on this, but relying on it here
13357 // means that we don't need an additional field on the work in
13358 // progress.
13359 var current = workInProgress.alternate;
13360
13361 // See if beginning this work spawns more work.
13362 startWorkTimer(workInProgress);
13363 {
13364 ReactDebugCurrentFiber.setCurrentFiber(workInProgress);
13365 }
13366
13367 if (true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
13368 stashedWorkInProgressProperties = _assign({}, workInProgress);
13369 }
13370 var next = beginWork(current, workInProgress, nextRenderExpirationTime);
13371
13372 {
13373 ReactDebugCurrentFiber.resetCurrentFiber();
13374 }
13375 if (true && ReactFiberInstrumentation_1.debugTool) {
13376 ReactFiberInstrumentation_1.debugTool.onBeginWork(workInProgress);
13377 }
13378
13379 if (next === null) {
13380 // If this doesn't spawn new work, complete the current work.
13381 next = completeUnitOfWork(workInProgress);
13382 }
13383
13384 ReactCurrentOwner.current = null;
13385
13386 return next;
13387 }
13388
13389 function workLoop(isAsync) {
13390 if (!isAsync) {

Callers 1

workLoopFunction · 0.70

Calls 3

startWorkTimerFunction · 0.70
beginWorkFunction · 0.70
completeUnitOfWorkFunction · 0.70

Tested by

no test coverage detected