Skip to content

Instantly share code, notes, and snippets.

@drumnickydrum
Last active February 10, 2023 14:32
Show Gist options
  • Save drumnickydrum/d02bd4ee47e519e057f717facd095d67 to your computer and use it in GitHub Desktop.
Save drumnickydrum/d02bd4ee47e519e057f717facd095d67 to your computer and use it in GitHub Desktop.
[RxJS: Higher-Order Maps] Use cases for most common higher-order map operators #rxjs #angular #operators

From Reactive Patterns for RxJS with Angular Chapter 7: Transforming Streams

Operator Use Case
concatMap If the order is important and you need to process operations in sequence while waiting for completion.
mergeMap If the order is not important and you need to process operations in parallel to enhance performance.
switchMap If you need to put a cancellation logic to release resources and take always the most recent information.
exhaustMap To ignore new observables while the current one is still ongoing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment