(fn, a)
| 14075 | // TODO: Batching should be implemented at the renderer level, not within |
| 14076 | // the reconciler. |
| 14077 | function flushSync(fn, a) { |
| 14078 | !!isRendering ? invariant(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0; |
| 14079 | var previousIsBatchingUpdates = isBatchingUpdates; |
| 14080 | isBatchingUpdates = true; |
| 14081 | try { |
| 14082 | return syncUpdates(fn, a); |
| 14083 | } finally { |
| 14084 | isBatchingUpdates = previousIsBatchingUpdates; |
| 14085 | performSyncWork(); |
| 14086 | } |
| 14087 | } |
| 14088 | |
| 14089 | function interactiveUpdates(fn, a, b) { |
| 14090 | if (isBatchingInteractiveUpdates) { |
nothing calls this directly
no test coverage detected