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

Function flushSyncWork

packages/react-reconciler/src/ReactFiberWorkLoop.js:1857–1863  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1855// If called outside of a render or commit will flush all sync work on all roots
1856// Returns whether the the call was during a render or not
1857export function flushSyncWork(): boolean {
1858 if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
1859 flushSyncWorkOnAllRoots();
1860 return false;
1861 }
1862 return true;
1863}
1864
1865export function isAlreadyRendering(): boolean {
1866 // Used by the renderer to print a warning if certain APIs are called from

Callers 6

scheduleRefreshFunction · 0.90
scheduleRootFunction · 0.90
componentDidMountMethod · 0.50
componentDidUpdateMethod · 0.50
componentWillUnmountMethod · 0.50

Calls 1

flushSyncWorkOnAllRootsFunction · 0.90

Tested by

no test coverage detected