Skip to content

Commit 62aa10f

Browse files
author
Simon
committed
updated mobx & mobx-reaction
1 parent 0211854 commit 62aa10f

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"jest": "^24.9.0",
2929
"jest-preset-angular": "^8.0.0",
3030
"lodash": "^4.17.21",
31-
"mobx": "^6.1.8",
31+
"mobx": "^6.3.6",
3232
"mobx-remotedev": "^0.3.6",
3333
"rxjs": "^7.4.0",
3434
"todomvc-app-css": "^2.3.0",

projects/mobx-angular/src/lib/mobx-reaction.directive.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { MobxAutorunDirective } from './mobx-autorun.directive';
55
@Directive({ selector: '[mobxReaction]' })
66
export class MobxReactionDirective extends MobxAutorunDirective {
77
@Input() mobxReaction;
8-
@Input() mobxReactionOptions: IReactionOptions;
8+
@Input() mobxReactionOptions: IReactionOptions<any, any>;
99

1010
constructor(
1111
protected templateRef: TemplateRef<any>,
@@ -15,7 +15,10 @@ export class MobxReactionDirective extends MobxAutorunDirective {
1515
}
1616

1717
autoDetect(view) {
18-
const opts: IReactionOptions = Object.assign({ fireImmediately: true }, this.mobxReactionOptions);
18+
const opts: IReactionOptions<any, any> = Object.assign(
19+
{ fireImmediately: true },
20+
this.mobxReactionOptions
21+
);
1922

2023
this.dispose = reaction(
2124
this.mobxReaction,

0 commit comments

Comments
 (0)