Monday, December 3, 2018

.map versus .switchMap

Beyond what .map does .switchMap will do some flattening so that if you are mapping to Observables and you are mapping Observables of Foo, Bar, Baz, and Quz you will not get Observables of Observables of Foo, Bar, Baz, and Quz but instead just Observables of Foo, Bar, Baz, and Quz. The nesting is ironed away.

No comments:

Post a Comment