Reputation: 18214
If flatMap()
is equivalent to map().mergeAll()
,
then what is switchMap()
equivalent to ?
Upvotes: 2
Views: 354
Reputation: 96909
The switchMap()
operator is equivalent to using map().switch()
.
Since the switch()
operator works only with higher-order Observables the preceding map()
has to return an Observable. There's no switchAll()
operator because the switch()
operator already works with higher-order Observables(just like all *all()
operators).
Upvotes: 4