Guest User

Untitled

a guest
Dec 12th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. There are multiple flattening strategies for observables:
  2.  
  3. With mergeMap (which has flatMap as an alias), received observables are subscribed to concurrently and their emitted values are flattened into the output stream.
  4. With concatMap, received observables are queued and are subscribed to one after the other, as each completes. (concatMap is mergeMap with a concurrency of one.)
  5. With switchMap, when an observable is received it's subscribed to and any subscription to a previously received observable is unsubscribed.
  6. With exhaustMap, when an observable is received it's subscribed to unless there is a subscription to a previously received observable and that observable has not yet completed - in which case the received observable is ignored.
  7. The concatAll, exhaust, mergeAll and switchAll operators for higher-order observables are implemented using the *Map operators.
Add Comment
Please, Sign In to add comment