MCPcopy Create free account
hub / github.com/BetaSu/big-react / unwindUnitOfWork

Function unwindUnitOfWork

packages/react-reconciler/src/workLoop.ts:464–486  ·  view source on GitHub ↗
(unitOfWork: FiberNode)

Source from the content-addressed store, hash-verified

462}
463
464function unwindUnitOfWork(unitOfWork: FiberNode) {
465 let incompleteWork: FiberNode | null = unitOfWork;
466 do {
467 const next = unwindWork(incompleteWork);
468
469 if (next !== null) {
470 next.flags &= HostEffectMask;
471 workInProgress = next;
472 return;
473 }
474
475 const returnFiber = incompleteWork.return as FiberNode;
476 if (returnFiber !== null) {
477 returnFiber.deletions = null;
478 }
479 incompleteWork = returnFiber;
480 // workInProgress = incompleteWork;
481 } while (incompleteWork !== null);
482
483 // 没有 边界 中止unwind流程,一直到root
484 workInProgress = null;
485 workInProgressRootExitStatus = RootDidNotComplete;
486}

Callers 1

throwAndUnwindWorkLoopFunction · 0.85

Calls 1

unwindWorkFunction · 0.90

Tested by

no test coverage detected