MergeMap
Projects each source value to an Observable which is merged in the output Observable.
Parameters
project | A function that, when applied to an item emitted by the source Observable, returns an Observable. |
resultSelector | Optional. Default is Type: |
concurrent | Optional. Default is Maximum number of input Observables being subscribed to concurrently. |
Projects each source value to an Observable which is merged in the output Observable. Maps each value to an Observable, then flattens all of these inner Observables using mergeAll.
The main difference between mergeMap
and concatMap
is that concatMap
wait until the previous observable ends to start executing the next the mergeMap
does not do that as you can see in the previous image.
Last updated