How we’re embracing functional programming to build a large SPA
summary
Claims that Redux can be reimplemented with RxJS and shows a working architecture: an action stream as Subject, state streams that accumulate reducers, view streams that map state to props, and routines that handle side effects. Uses RxJS operators (notably switchMap cancellation) to cancel in-flight async, and creates proxy state from Backbone to integrate legacy models. Hits real problems: uncaught errors kill streams, cold vs hot producers, and awkward debugging, but the refactor meaningfully decouples a monolith and mostly works.
AI-written summary · about
chapters (17)
- 0:00Intro
- 1:09Outline
- 1:31Functional Reactive Programming?
- 3:00The Observable - Comes from Reactive extensions (RX)
- 5:10Redux with redux-observable
- 5:52Streams made sense
- 8:44From the Redux documentation
- 9:07The Building Blocks
- 9:50The Action Stream - Allows any part of the application to communicate
- 10:22Routines
- 12:05Roadblock: Dead streams?
- 13:41Advanced state streams: derived state
- 14:40Advanced state streams: proxy state
- 16:00Roadblock: cold vs. hot?
- 18:32View streams: fetching data
- 20:51Benefits of RxJS & streams
- 21:49Should you embrace streams?
related talks
27mEmbrace Reactive Programming in React and Vue with RxJS
28mReactive Programming Demystified Drink the Kool-Aid
28mReacting to change
36mRxJS: A Better Way to Write Frontend Applications
35mAsync Redux Actions With RxJS
24mAdding Even More Fun to Functional Programming With RXJS
35mManaging State in React Apps with RxJS
37mStreaming and event-based programming using FRP and RxJS
