1×
Become a member
to unlock all features
Autoplay

    Use switchMap to avoid leaks when flattening

    rxjsRxJS
    ^5.0.0

    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.