These four operators can often confuse new developers as the difference between them is minute, but very important!

It all boils down on how the inner observable reacts when a new value comes in from the outer observable.

Preparations

What does all this mean? Let’s create a simple example. The difference only comes up if we let time pass so lets craft an example where we want to make a pipeline which receives timestamps, immediately emits that the timestamp is older than the current time, then it should emit again, once it expired.

#javascript #rxjs #typescript

RxJS and the Difference Between mergeMap, switchMap, concatMap and exhaustMap
2.20 GEEK