Angular - State Management
Given this effect code snippet:
What happens when the
loadData$ = createEffect(() => this.actions$.pipe(
ofType(loadData),
switchMap(() => this.api.getData()),
map(data => loadDataSuccess({ data })),
catchError(() => of(loadDataFailure()))
));What happens when the
loadData action is dispatched?