mobx 7.0.3 → 7.0.4
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 +10 -0
- package/dist/api/makeObservable.d.ts +0 -2
- package/dist/core/reaction.d.ts +1 -1
- package/dist/mobx.cjs.development.js +4 -1
- 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 -1
- package/dist/mobx.esm.development.js.map +1 -1
- package/dist/mobx.esm.js +4 -1
- 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.mjs +4 -1
- package/dist/mobx.mjs.map +1 -1
- package/dist/mobx.umd.development.js +4 -1
- 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/api/makeObservable.ts +0 -7
- package/src/core/computedvalue.ts +4 -1
- package/src/core/reaction.ts +1 -1
package/dist/mobx.mjs
CHANGED
|
@@ -1387,7 +1387,10 @@ class ComputedValue {
|
|
|
1387
1387
|
reportObserved(this);
|
|
1388
1388
|
if (shouldCompute(this)) {
|
|
1389
1389
|
let prevTrackingContext = globalState.trackingContext;
|
|
1390
|
-
if (this.keepAlive_
|
|
1390
|
+
if (!prevTrackingContext && (this.keepAlive_ || this.isBeingObserved)) {
|
|
1391
|
+
// An observed or keep-alive computed can be recomputed by an untracked
|
|
1392
|
+
// read, for example from inside an action. Its dependencies are still
|
|
1393
|
+
// transitively observed and must fire their lifecycle hooks
|
|
1391
1394
|
globalState.trackingContext = this;
|
|
1392
1395
|
}
|
|
1393
1396
|
if (this.trackAndCompute()) {
|