(fn, a)
| 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) { |
nothing calls this directly
no test coverage detected