Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
addCartItem: Observable<Action> = this.actions$.pipe(
concatMap(({ itemId }) =>
// Notice, that nothing is passed to the Success.
map(() => new cartActions.AddItemSuccess()),
// passing the itemId to the Error, so it can be restored.
catchError(() => of(new cartActions.AddItemError(itemId)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.