Angular - State Management
Consider this effect:
What happens if multiple 'SAVE_ITEM' actions are dispatched quickly?
saveItem$ = createEffect(() => this.actions$.pipe(
ofType('SAVE_ITEM'),
exhaustMap(action => this.api.save(action.payload).pipe(
map(() => ({ type: 'SAVE_SUCCESS' })),
catchError(() => of({ type: 'SAVE_FAILURE' }))
))
))What happens if multiple 'SAVE_ITEM' actions are dispatched quickly?
