(fn, a)
| 13170 | // TODO: Batching should be implemented at the renderer level, not within |
| 13171 | // the reconciler. |
| 13172 | function flushSync(fn, a) { |
| 13173 | !!isRendering ? invariant(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0; |
| 13174 | var previousIsBatchingUpdates = isBatchingUpdates; |
| 13175 | isBatchingUpdates = true; |
| 13176 | try { |
| 13177 | return syncUpdates(fn, a); |
| 13178 | } finally { |
| 13179 | isBatchingUpdates = previousIsBatchingUpdates; |
| 13180 | performSyncWork(); |
| 13181 | } |
| 13182 | } |
| 13183 | |
| 13184 | function interactiveUpdates(fn, a, b) { |
| 13185 | if (isBatchingInteractiveUpdates) { |
nothing calls this directly
no test coverage detected