MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / bailoutOnAlreadyFinishedWork

Function bailoutOnAlreadyFinishedWork

code/styling/public/app.js:10442–10461  ·  view source on GitHub ↗
(current, workInProgress)

Source from the content-addressed store, hash-verified

10440 */
10441
10442 function bailoutOnAlreadyFinishedWork(current, workInProgress) {
10443 cancelWorkTimer(workInProgress);
10444
10445 // TODO: We should ideally be able to bail out early if the children have no
10446 // more work to do. However, since we don't have a separation of this
10447 // Fiber's priority and its children yet - we don't know without doing lots
10448 // of the same work we do anyway. Once we have that separation we can just
10449 // bail out here if the children has no more work at this priority level.
10450 // if (workInProgress.priorityOfChildren <= priorityLevel) {
10451 // // If there are side-effects in these children that have not yet been
10452 // // committed we need to ensure that they get properly transferred up.
10453 // if (current && current.child !== workInProgress.child) {
10454 // reuseChildrenEffects(workInProgress, child);
10455 // }
10456 // return null;
10457 // }
10458
10459 cloneChildFibers(current, workInProgress);
10460 return workInProgress.child;
10461 }
10462
10463 function bailoutOnLowPriority(current, workInProgress) {
10464 cancelWorkTimer(workInProgress);

Callers 9

updateFragmentFunction · 0.70
updateModeFunction · 0.70
finishClassComponentFunction · 0.70
updateHostRootFunction · 0.70
updateHostComponentFunction · 0.70
updatePortalComponentFunction · 0.70
updateContextProviderFunction · 0.70
updateContextConsumerFunction · 0.70

Calls 2

cancelWorkTimerFunction · 0.70
cloneChildFibersFunction · 0.70

Tested by

no test coverage detected