MCPcopy
hub / github.com/facebook/react / flushRoot

Function flushRoot

packages/react-reconciler/src/ReactFiberWorkLoop.js:1732–1744  ·  view source on GitHub ↗
(root: FiberRoot, lanes: Lanes)

Source from the content-addressed store, hash-verified

1730}
1731
1732export function flushRoot(root: FiberRoot, lanes: Lanes) {
1733 if (lanes !== NoLanes) {
1734 upgradePendingLanesToSync(root, lanes);
1735 ensureRootIsScheduled(root);
1736 if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
1737 resetRenderTimer();
1738 // TODO: For historical reasons this flushes all sync work across all
1739 // roots. It shouldn't really matter either way, but we could change this
1740 // to only flush the given root.
1741 flushSyncWorkOnAllRoots();
1742 }
1743 }
1744}
1745
1746export function getExecutionContext(): ExecutionContext {
1747 return executionContext;

Callers 1

Calls 4

ensureRootIsScheduledFunction · 0.90
flushSyncWorkOnAllRootsFunction · 0.90
resetRenderTimerFunction · 0.85

Tested by

no test coverage detected