I have an ionic 4 application where I am using NgRX 8.
The following code compiles:
connect1$ =
this.actions$.pipe(
// restart counter on every click
switchMap(() => interval(1000))
);
but when I use createEffect() as follows:
connect2$ = createEffect(() =>
this.actions$.pipe(
// restart counter on every click
switchMap(() => interval(1000))
)
);
I get the following error:
Type 'Observable' is not assignable to type 'Observable | ((...args: any[]) => Observable)'
I saw in a previous post the suggestion of removing createEffect() to get to the issue with the syntax. But when I do this the older syntax does not give any issues.
NgRX 8 effects - Type 'Observable<unknown>' is not assignable to type 'Observable<Action>'
Any suggestions as to what I might look at?
Thanks