mobx 6.8.0 → 6.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/core/globalstate.d.ts +4 -0
- package/dist/mobx.cjs.development.js +4 -0
- package/dist/mobx.cjs.development.js.map +1 -1
- package/dist/mobx.cjs.production.min.js +1 -1
- package/dist/mobx.cjs.production.min.js.map +1 -1
- package/dist/mobx.esm.development.js +4 -0
- package/dist/mobx.esm.development.js.map +1 -1
- package/dist/mobx.esm.js +4 -0
- package/dist/mobx.esm.js.map +1 -1
- package/dist/mobx.esm.production.min.js +1 -1
- package/dist/mobx.esm.production.min.js.map +1 -1
- package/dist/mobx.umd.development.js +4 -0
- package/dist/mobx.umd.development.js.map +1 -1
- package/dist/mobx.umd.production.min.js +1 -1
- package/dist/mobx.umd.production.min.js.map +1 -1
- package/package.json +1 -1
- package/src/core/atom.ts +8 -1
- package/src/core/globalstate.ts +5 -0
|
@@ -458,6 +458,9 @@ var Atom = /*#__PURE__*/function () {
|
|
|
458
458
|
_proto.reportChanged = function reportChanged() {
|
|
459
459
|
startBatch();
|
|
460
460
|
propagateChanged(this);
|
|
461
|
+
// We could update state version only at the end of batch,
|
|
462
|
+
// but we would still have to switch some global flag here to signal a change.
|
|
463
|
+
globalState.stateVersion = globalState.stateVersion < Number.MAX_SAFE_INTEGER ? globalState.stateVersion + 1 : Number.MIN_SAFE_INTEGER;
|
|
461
464
|
endBatch();
|
|
462
465
|
};
|
|
463
466
|
_proto.toString = function toString() {
|
|
@@ -1824,6 +1827,7 @@ var MobXGlobals = function MobXGlobals() {
|
|
|
1824
1827
|
this.useProxies = true;
|
|
1825
1828
|
this.verifyProxies = false;
|
|
1826
1829
|
this.safeDescriptors = true;
|
|
1830
|
+
this.stateVersion = Number.MIN_SAFE_INTEGER;
|
|
1827
1831
|
};
|
|
1828
1832
|
var canMergeGlobalState = true;
|
|
1829
1833
|
var isolateCalled = false;
|