Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 855 Bytes

readme.md

File metadata and controls

9 lines (5 loc) · 855 Bytes

The Mother of All Operators - flatMap

In previous examples, we combined together sequences using merge, as well as zip, combineLatest and withLatestFrom. But there is one more fundamental operator, which is flatMap. Don't let the name scare you as it means simply that we are going to take the current value from the Observable, use map to project it to another Observable, and then we'll flatten it using mergeAll, which is a variant of the merge operator we've used before. The mergeAll operator simply takes an Observable of Observables and then merges it into a single Observable based upon time.

As always, for more information about Observables, check out the RxJS Documentation

Exercises

  1. Problem - Solution