1×
Become a member
to unlock all features
Autoplay

    Pause Until Another Stream Completes with exhaustMap in RxJS and Vue.js

    vueVue.js
    ^2.5.13
    rxjsRxJS
    5.5.12 - 6.4.0

    The switchMap operator is often referenced as the default operator when you need to switch to another stream (which happens when clicking a button switches to loading data). But in the scenario where you want the first stream (the button click) to "pause" until the second stream (the data loads) completes, exhaustMap is the proper operator to use.