(fn, a)
| 13972 | // TODO: Batching should be implemented at the renderer level, not within |
| 13973 | // the reconciler. |
| 13974 | function flushSync(fn, a) { |
| 13975 | !!isRendering ? invariant(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0; |
| 13976 | var previousIsBatchingUpdates = isBatchingUpdates; |
| 13977 | isBatchingUpdates = true; |
| 13978 | try { |
| 13979 | return syncUpdates(fn, a); |
| 13980 | } finally { |
| 13981 | isBatchingUpdates = previousIsBatchingUpdates; |
| 13982 | performSyncWork(); |
| 13983 | } |
| 13984 | } |
| 13985 | |
| 13986 | function interactiveUpdates(fn, a, b) { |
| 13987 | if (isBatchingInteractiveUpdates) { |
nothing calls this directly
no test coverage detected