Let's kill lifecycle
summary
Claim: React lifecycle methods make components fragile and hard to reason about, so move side effects out of component methods into reactive business logic. Shows a concrete five-field form with three business rules and three implementations: a lifecycle-heavy component that becomes unmaintainable; a modular but verbose approach using redux-saga (watchers/workers, selectors, put/select); and a concise reactive approach using RxJS switchMap / redux-observable that avoids race conditions, keeps rules testable, and isolates lifecycle concerns (tradeoffs: middleware boilerplate and learning curve).
AI-written summary · about
chapters (10)
- 0:00Introduction
- 3:22Lifecycle problems in React
- 6:11Complex form with lifecycle example
- 10:13Solution: Redux Saga and middleware
- 12:43Redux Saga solution demo
- 17:06Alternative: Redux Observable and RxJS
- 21:28Custom RxJS operators
- 24:07ReactoRex: RxJS and Redux integration
- 27:48Summary
- 28:51Q&A
related talks
31m(React)ive State Management: Enter RxJS
28mThe State of React State in 2019
43mReact/Redux: a development workflow
32mStructuring Your App’s Story With Sagas and Selectors
18mDestructuring state management (in React)
21mThinking Reactively: Most Difficult
33mStop Micromanaging State and Start Being Reactive
22mCrafting Pristine React: Best Practices for Maintainable Code
