Reactive hooks for Angular.
@Component({
selector: "app-root",
template: `
<div>Count: {{ count }}</div>
`,
})
export class AppComponent extends Connectable {
@Input()
count: number = 0
ngOnConnect() {
effect(() =>
interval(1000).subscribe(() =>
this.count += 1
)
)
}
}
Note
|
Looking for the previous (9.0.x) docs? Click here. |
npm install ng-effects@next