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

Опубликовано: 19 Март 2025
на канале: Fabio Biondi - Front-End Tutorials
6,099
191

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:
• LinkedIn:   / fabiobiondi  
• Twitch:   / fabio_biondi  

00:00 Introduction
02:00 map + mergeAll
02:57 mergeMap
04:11 concatMap
04:58 switchMap
05:35 exhaustMap
06:18 Nested Http Calls