I ve noticed that the n…

less than 1 minute read

I’ve noticed that the @nrwl/angular - ngrx schematics include this custom fetch operator within the generated effect. What is the difference with using this operator and something like mergeMap? I’ve also noticed that is seems to be lacking the ability to dispatch multiple actions since the return type for the run callback function is only a single Action. Are there other custom operators that I can use? loadApplications$ = createEffect(() => this.actions$.pipe( ofType(ApplicationActions.loadApplications), fetch({ run: (action) => { // Your custom service 'load' logic goes here. For now just return a success action... }, onError: (action, error) => { return ApplicationActions.loadApplicationsFailure({ error }); }, }) ) );