Yet another try to explain RxJS operators – switchMap, mergeMap, concatMap and exhaustMap
I don’t know if it’s just me, but when I started to learn Angular and RxJS, it was hard for me to figure out which operator to use to do a certain thing. The switchMap, mergeMap, exhaustMap and concatMap all seem to be similar and the documentation uses very generic examples – transforming ‘1’ into ‘1A’ and it’s hard to translate it to the real-life use cases.
This is my try to explain those 4 operators, which seem to do the same action, but they have some differences and they should be used in different contexts.