Use switchMap to avoid leaks when flattening

André Staltz
InstructorAndré Staltz

Share this video with your friends

Send Tweet

While flatMap is popular and convenient for flattening higher-order Observables, it can introduce new kinds of bugs related to subscriptions. In this lesson we will see how switchMap is a sensible default that avoids common bugs.