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

Function flushSync

code/redux/public/app.js:14190–14200  ·  view source on GitHub ↗
(fn, a)

Source from the content-addressed store, hash-verified

14188 // TODO: Batching should be implemented at the renderer level, not within
14189 // the reconciler.
14190 function flushSync(fn, a) {
14191 !!isRendering ? invariant(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0;
14192 var previousIsBatchingUpdates = isBatchingUpdates;
14193 isBatchingUpdates = true;
14194 try {
14195 return syncUpdates(fn, a);
14196 } finally {
14197 isBatchingUpdates = previousIsBatchingUpdates;
14198 performSyncWork();
14199 }
14200 }
14201
14202 function interactiveUpdates(fn, a, b) {
14203 if (isBatchingInteractiveUpdates) {

Callers

nothing calls this directly

Calls 3

invariantFunction · 0.70
syncUpdatesFunction · 0.70
performSyncWorkFunction · 0.70

Tested by

no test coverage detected