Async Redux Actions With RxJS
summary
Shows how redux-observable middleware wires RxJS observables into Redux as “epics” that take streams of actions and return action streams, using switchMap for implicit XHR cancellation and takeUntil for declarative aborts. Demonstrates debounce-on-type autocomplete, client-side rate limiting of clicks, and multiplexed WebSocket subscription with reconnect and reference counting. Claims much less imperative glue, works with Redux tooling, but notes a learning curve—RxJS has “60+ operators” though about eight to twelve cover most cases.
AI-written summary · about
chapters (21)
- 0:00Intro
- 0:13REACT RALLY
- 2:02What's a reducer?
- 2:27Reducers in Redux
- 7:44Callbacks
- 8:14Callback Hell (aka "the flying V")
- 8:34Promises provide a cleaner solution
- 9:50Why cancellation is important
- 14:34Times are changing
- 17:41Subscribing to an observable
- 22:08Async in redux without middleware
- 22:48Async in redux with middleware (and react-redux)
- 23:47Let's combine RxJS and redux!
- 24:43What's an "Epic"?
- 25:38Basic middleware setup
- 26:45Idiomatic redux increment decrement with added debounce
- 28:24Auto-Complete Plain JS
- 29:53Multiplexed Socket Plain JS
- 31:15Multiplexed Socket Epic
- 31:51The Good
- 34:49Co-Author Jay Phelps
related talks
23mHow we’re embracing functional programming to build a large SPA
36mRxJS: A Better Way to Write Frontend Applications
51mRedux, beyond React
49mRedux, beyond React
30mRxJS in React, RxJS in Angular and Why We Should All Be Friends
42mReactive JavaScript with RxJS
42mRedux-ing like a Pro
27mEmbrace Reactive Programming in React and Vue with RxJS
