Someone, please explain the difference between SwitchMap and FlatMap in terms of Javascript ( in angular perspective, rxjs 5)
In my understanding.
SwitchMap only emits the latest observable value and cancel previous observable.
flatMap collects all individual observable and returns all observables in a single array without caring the order of observable. works asynchronously.
concatMap preserve the order and emits all observable value, works synchronously
is that right?
how does mergeMap works differently from above?
someone, please explain with an example.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…