DEV Community

Play Button Pause Button
Fabio Biondi
Fabio Biondi

Posted on

Angular & RxJS Tips #2: Higher Order Observables - switchMap vs mergeMap vs concatMap vs exhaustMap

In this video I will talk about higher order observables, that are observables that emit other observables and especially I describe the differences between switchMap, mergeMap, concatMap and exhaustMap.

They can be really useful:
• nested http requests: we make a call to the server via httpClient, get the result and pass it to another http request
• we subscribe the valueChange of a reactive form and make a call to the server each time we type
• subscribe a Subject or a Store, acquire value, pass it on to another observable
• interceptors, guards and any other scenarios in which we need to create sequences of observables

Level: intermediate (you should already know Angular Fundamentals)


🔗 Follow me on:

Top comments (0)