Immer, Immutability and the Wonderful World of Proxies
summary
Demonstrates Immer as a tiny library that creates a draft via JavaScript proxies so ordinary mutation yields an immutable result with structural sharing, claiming Redux reducers become twice as short. Shows implementation details: produce(state, recipe) wraps the root in proxies, tracks reads/writes, and materializes a minimal next state. Builds a proxy-based REST client that generates methods and lazy‑fetches URL strings into promises; works in live tests but warns proxies are undetectable, readily abused, and risky in application code.
AI-written summary · about
chapters (23)
- 0:00Introduction
- 3:03The spread hell
- 3:50Better communication
- 4:48A new abstraction
- 9:36Immer in a nutshell
- 10:11Applications
- 10:44Proxies
- 12:37Traps
- 13:06undetectable
- 13:41Star Wars API
- 14:26Characters API
- 15:16Swagger
- 15:42Using proxies
- 18:50Fetching URLs
- 19:12Trap URLs
- 22:39Storage API
- 22:50Emma
- 24:56Graphs
- 26:21True Singletons
- 27:20Change Detection
- 27:37National
- 28:45Trap
- 30:07Thank you
related talks
30mImmer, Immutability and the Wonderful World of Proxies
19mImmutability is Changing: From Immutable.js to Immer
26mJavaScript Metaprogramming - ES6 Proxy Use and Abuse
52mJavaScript Metaprogramming - ES6 Proxy Use and Abuse
45mJavaScript Immutability - "Don't Go Changing"
52mState management beyond the libraries
27mUnlock the Proxy Power (Vue.js)
29mThe Immutable Way: A Guide to Cleaner, More Predictable JavaScript
