Purify Your Redux App
summary
Shows how to decouple a Redux application by having business logic emit pure, return-value actions that describe workflows, and running those workflows in a middleware interpreter instead of performing side effects in reducers. Implements a small weather app and a middleware that interprets action-chaining sequences, mapping actions to HTTP, geolocation, and display effects, and supports Redux with Promise/Observable backends; the approach is inspired by free-monad ideas and yields a pure DSL that makes unit testing easier (example code at utinity/purify-redux-example).
AI-written summary · about
chapters (18)
- 0:00Introduction
- 3:54Hexagonal architecture
- 6:03Weather app example
- 7:33Uncoupled version
- 9:20Framework dependency issues
- 11:10Decoupling with actions
- 12:58Redux for decoupling
- 15:31Action creators version
- 17:59Middleware limitations
- 19:25Action chaining
- 22:15Middleware for chaining
- 24:04Pure functions version
- 25:50DSL via actions
- 27:56DSL abstraction
- 29:07Hexagonal summary
- 31:19Comparison with generators
- 31:59Inspiration from Free Monads
- 33:45Conclusion
related talks
25mPractical Advanced Redux
27mHow to Write Bad Code in Redux
28mWriting better multi-process hybrid apps with React and Redux
33mAdvanced Redux - Design Patterns and Practices
27mThe Redux Journey
20mConsuming services reliably in Redux without losing your mind
51mBuilding React Applications with Redux
44mThe Fundamentals of Redux
