File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -72,10 +72,10 @@ export class StatefulComponent {
72
72
providers: [RxState ],
73
73
})
74
74
export class StatefulComponent {
75
- readonly title$ = this .select (' title' );
75
+ readonly title$ = this .state . select (' title' );
76
76
77
77
@Input () set title(title : string ) {
78
- this .state .setState ({ title });
78
+ this .state .set ({ title });
79
79
}
80
80
81
81
constructor (private state : RxState <{ title: string }>) {}
@@ -149,7 +149,7 @@ Often it is needed to get the previous state to calculate the new one.
149
149
providers: [RxState ]
150
150
})
151
151
export class StatefulComponent {
152
- readonly items$ = this .select (' items' );
152
+ readonly items$ = this .state . select (' items' );
153
153
readonly btnClick$ = new Subject ();
154
154
155
155
constructor (private state : RxState <{list: {id: number }}>) {
You can’t perform that action at this time.
0 commit comments