mergeMap
Introduction
Section titled “Introduction”mergeMap runs all inner Observables concurrently without cancellation.
Example
Section titled “Example”clicks$.pipe( mergeMap(event => this.http.post('/api/log', event))).subscribe(); // All requests fire in parallelWhen to Use
Section titled “When to Use”- Fire-and-forget parallel requests
- Uploading multiple files
- Logging events
Summary
Section titled “Summary”mergeMap is ideal for scenarios where all operations should run in parallel.”