1 | import { configure } from "mobx";
|
2 | export function defaultNoopBatch(callback) {
|
3 | callback();
|
4 | }
|
5 | export function observerBatching(reactionScheduler) {
|
6 | if (!reactionScheduler) {
|
7 | reactionScheduler = defaultNoopBatch;
|
8 | if ("production" !== process.env.NODE_ENV) {
|
9 | console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native");
|
10 | }
|
11 | }
|
12 | configure({ reactionScheduler: reactionScheduler });
|
13 | }
|
14 | export var isObserverBatched = function () {
|
15 | if ("production" !== process.env.NODE_ENV) {
|
16 | console.warn("[MobX] Deprecated");
|
17 | }
|
18 | return true;
|
19 | };
|
20 |
|
\ | No newline at end of file |