What is the difference between switchMap, concatMap and mergeMap operators in RxJS?
Interviews1 answer
What is the difference between switchMap, concatMap and mergeMap in RxJS?
1 Answer
flatMap/mergeMap - creates an Observable immediately for any source item, all previous Observables are kept alive
concatMap - waits for the previous Observable to complete before creating the next one
switchMap - for any source item, completes the previous Observable and immediately creates the next one
exhaustMap - source items are ignored while the previous Observable is not completed
Pranam BhatPosted May 24, 2021, 4:04 AM EDT


