(fn, a)
| 13261 | // TODO: Batching should be implemented at the renderer level, not within |
| 13262 | // the reconciler. |
| 13263 | function flushSync(fn, a) { |
| 13264 | !!isRendering ? invariant(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0; |
| 13265 | var previousIsBatchingUpdates = isBatchingUpdates; |
| 13266 | isBatchingUpdates = true; |
| 13267 | try { |
| 13268 | return syncUpdates(fn, a); |
| 13269 | } finally { |
| 13270 | isBatchingUpdates = previousIsBatchingUpdates; |
| 13271 | performSyncWork(); |
| 13272 | } |
| 13273 | } |
| 13274 | |
| 13275 | function interactiveUpdates(fn, a, b) { |
| 13276 | if (isBatchingInteractiveUpdates) { |
nothing calls this directly
no test coverage detected