RxJS: destroy the state machine!
summary
SaleMove replaces a sprawling state machine with RxJS observables, turning UI events, AJAX and server streams into composable asynchronous collections so code becomes map/filter/merge instead of callbacks and mutable flags. Examples show double‑click detection implemented with buffer + throttle, mousemove cleanup via takeUntil, and converting XHR promises into Observable from Promise, which removes manual listener removal, enables synchronous-style testing, prevents common memory leaks and reduces race conditions across client and server.
AI-written summary · about
chapters (15)
- 0:00Introduction and speaker intro
- 1:19Async problems in SaleMove
- 4:17What is reactive programming
- 6:46Streams as collections
- 9:15Stream operations and magic
- 12:30RxJS overview and observables
- 14:15Promises vs observables
- 17:50Code examples with RxJS
- 19:35Double-click detection with observables
- 20:40Memory leak prevention
- 21:42Cleanup with takeUntil
- 22:02Callback hell refactored
- 23:06SaleMove's RxJS adoption
- 23:49Server-side RxJS usage
- 24:32Frameworks using RxJS
related talks
35mRxJS destroy the state machine
34mOperate Heavily Dynamic UIs with RxJS
43mAdvanced patterns in RxJS - Operating heavily dynamic UI’s with RxJS
45mRxJS 5 In Modern Web Applications
42mAdvanced RxJS: State Management and Animations
14mState management without pain
20mSubjecting State to Good Behavior
33mStop Micromanaging State and Start Being Reactive
