UNPKG

958 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.isObserverBatched = exports.observerBatching = exports.defaultNoopBatch = void 0;
4var mobx_1 = require("mobx");
5function defaultNoopBatch(callback) {
6 callback();
7}
8exports.defaultNoopBatch = defaultNoopBatch;
9function observerBatching(reactionScheduler) {
10 if (!reactionScheduler) {
11 reactionScheduler = defaultNoopBatch;
12 if ("production" !== process.env.NODE_ENV) {
13 console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native");
14 }
15 }
16 (0, mobx_1.configure)({ reactionScheduler: reactionScheduler });
17}
18exports.observerBatching = observerBatching;
19var isObserverBatched = function () {
20 if ("production" !== process.env.NODE_ENV) {
21 console.warn("[MobX] Deprecated");
22 }
23 return true;
24};
25exports.isObserverBatched = isObserverBatched;
26//# sourceMappingURL=observerBatching.js.map
\No newline at end of file