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.
@@ -1384,7 +1384,10 @@ class ComputedValue {
1384
1384
  reportObserved(this);
1385
1385
  if (shouldCompute(this)) {
1386
1386
  let prevTrackingContext = globalState.trackingContext;
1387
- if (this.keepAlive_ && !prevTrackingContext) {
1387
+ if (!prevTrackingContext && (this.keepAlive_ || this.isBeingObserved)) {
1388
+ // An observed or keep-alive computed can be recomputed by an untracked
1389
+ // read, for example from inside an action. Its dependencies are still
1390
+ // transitively observed and must fire their lifecycle hooks
1388
1391
  globalState.trackingContext = this;
1389
1392
  }
1390
1393
  if (this.trackAndCompute()) {