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

Share this video with your friends

Send Tweet

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.