Managing State in React Apps with RxJS
summary
Claims that RxJS can replace Redux + Redux Observable by running an app state as a BehaviorSubject and wiring React via a higher-order component connector and hooks, shows actions as functions that return observables and uses BehaviorSubject and RxJS exclusively as the single source of truth. A small proof-of-concept application is built and works, but profiling shows higher heap allocations and deeper call stacks (milliseconds slower) so performance is a real caveat; well suited for aggregating many real-time streams but not necessarily for every app.
AI-written summary · about
chapters (13)
- 0:00Start
- 1:42Background
- 2:25What Even Is Rxjs
- 4:55Scan Operator
- 7:18Transforming a Click Event
- 8:00Switch Map Operator
- 12:08Cold Observable
- 13:39Subjects
- 14:46Redux Observable
- 18:39Live Demo
- 22:18Export an Upstate Binding
- 23:06React Hooks
- 28:33Compared to Redux
related talks
31m(React)ive State Management: Enter RxJS
36mRxJS: A Better Way to Write Frontend Applications
36mModern React and the case for Reactive State Management
23mHow we’re embracing functional programming to build a large SPA
49mRedux, beyond React
51mBuilding React Applications with Redux
14mState management without pain
18mDestructuring state management (in React)
