Created
July 27, 2018 21:41
-
-
Save moniuch/37161dc357c34efaf13865beaa99fa63 to your computer and use it in GitHub Desktop.
Effect resilience
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ofType(SOMETYPE).pipe( | |
tap(_ => console.log('effect still alive and kicking')), | |
map(action => action.payload), | |
// switchMap, mergeMap, concatMap, exhaustMap? | |
switchMap(payload => this.myService.putSomething(payload).pipe( | |
map(response => new MySuccessAction(response)), | |
catchError(err => of(new MyFailureAction())), | |
), | |
) | |
// service.ts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment