Example that demonstrates the differences between mergeMap, concatMap and switchMap. Click the button to create an observable that emits 10 values in sequence, A0,A1,A2 etc.
- mergeMap will merge multiple streams, so you get interleaved "A" values every time you click.
- concatMap will only start emitting values after the previous sequence has completed.
- switchMap will start emitting a new sequence after each click.
Code sandbox: https://codesandbox.io/s/rxjs-merge-examples-4wffj?file=/index.html:0-236