What is switchMap equivalent to in unflattened form?

扶醉桌前 提交于 2019-12-24 02:26:03

问题


If flatMap() is equivalent to map().mergeAll(), then what is switchMap() equivalent to ?


回答1:


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).



来源:https://stackoverflow.com/questions/43165848/what-is-switchmap-equivalent-to-in-unflattened-form

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!