Angular - State Management
Which of the following is the correct way to create an effect using Angular's
createEffect function?createEffect function?createEffect function expects a function returning an observable, so it should be () => this.actions$.pipe(...).switchMap is correct for side effects that return new observables. const loadData$ = createEffect(() => this.actions$.pipe(ofType(load), switchMap(() => fetchData()))); uses this correctly.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions