A Super Ninja Trick To Learn RxJS’s “switchMap”, “mergeMap”, “concatMap” and “exhaustMap”, FOREVER!
Shai Reznik
3.7K23

I found this article because I am having the ordering issue, and I most relate to the confused guy from the video. I have an RxBinding on a textBox for autocomplete. I subscribe to that and in the body I make a network call using retrofit and subscribe to that. This follows the model with 2 subscriptions. I could apply the switch strategy to that, or I should be able to replace the 1st subscribe with a switchMap.

However, if I use switchMap this all becomes a single chain and the RxBinding stops emitting when I successfully receive results from the retrofit call. Whereas with 2 subscribes, the completion of the 2nd subscribe do not affect the 1st so the RxBinding continues to emit. Am I misunderstanding something?