mobx 6.4.1 → 6.4.2

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # mobx
2
2
 
3
+ ## 6.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`2caf7e1a`](https://github.com/mobxjs/mobx/commit/2caf7e1a3504dde3d7c9bde3c6fb56ca85168018) [#3316](https://github.com/mobxjs/mobx/pull/3316) Thanks [@urugator](https://github.com/urugator)! - `requiresObservable` always takes precedence over global `reactionRequiresObservable`
8
+
3
9
  ## 6.4.1
4
10
 
5
11
  ### Patch Changes
@@ -29,7 +29,7 @@ export declare class Reaction implements IDerivation, IReactionPublic {
29
29
  name_: string;
30
30
  private onInvalidate_;
31
31
  private errorHandler_?;
32
- requiresObservable_: boolean;
32
+ requiresObservable_?: any;
33
33
  observing_: IObservable[];
34
34
  newObserving_: IObservable[];
35
35
  dependenciesState_: IDerivationState_;
@@ -41,7 +41,7 @@ export declare class Reaction implements IDerivation, IReactionPublic {
41
41
  isTrackPending_: boolean;
42
42
  isRunning_: boolean;
43
43
  isTracing_: TraceMode;
44
- constructor(name_: string, onInvalidate_: () => void, errorHandler_?: ((error: any, derivation: IDerivation) => void) | undefined, requiresObservable_?: boolean);
44
+ constructor(name_: string, onInvalidate_: () => void, errorHandler_?: ((error: any, derivation: IDerivation) => void) | undefined, requiresObservable_?: any);
45
45
  onBecomeStale_(): void;
46
46
  schedule_(): void;
47
47
  isScheduled(): boolean;
@@ -1966,7 +1966,7 @@ function warnAboutDerivationWithoutDependencies(derivation) {
1966
1966
  return;
1967
1967
  }
1968
1968
 
1969
- if (globalState.reactionRequiresObservable || derivation.requiresObservable_) {
1969
+ if (typeof derivation.requiresObservable_ === "boolean" ? derivation.requiresObservable_ : globalState.reactionRequiresObservable) {
1970
1970
  console.warn("[mobx] Derivation '" + derivation.name_ + "' is created/updated without reading any observable value.");
1971
1971
  }
1972
1972
  }
@@ -2437,10 +2437,6 @@ var Reaction = /*#__PURE__*/function () {
2437
2437
  name_ = "Reaction@" + getNextId() ;
2438
2438
  }
2439
2439
 
2440
- if (requiresObservable_ === void 0) {
2441
- requiresObservable_ = false;
2442
- }
2443
-
2444
2440
  this.name_ = void 0;
2445
2441
  this.onInvalidate_ = void 0;
2446
2442
  this.errorHandler_ = void 0;