Immutability is Changing: From Immutable.js to Immer
summary
Compares Immutable.js (2015) and Immer (2018) and shows how Immer uses ES6 Proxies to give immutable semantics by mutating drafts and returning structural-shared copies. Claims: persistent trie-backed structures in Immutable.js give fast O(1) lookups and structural sharing but impose ~300 APIs and interoperability costs; Immer exposes one produce API, keeps native JS objects, matches Immutable.js performance while being about a quarter of the size, supports patching and currying, and is driving fast adoption since late 2018.
AI-written summary · about
chapters (7)
- 0:00Intro
- 0:35Why Immutability
- 5:14The API
- 10:45proxies
- 15:02why immutability is changing
- 15:58adoption curve
- 16:33API design lessons
related talks
30mImmer, Immutability and the Wonderful World of Proxies
45mJavaScript Immutability - "Don't Go Changing"
31mImmer, Immutability and the Wonderful World of Proxies
31mImmutable Data and React
45mHow I Made Immer Twice as Fast: Performance Optimization in Practice
33mImmutable data structures for functional JS
27mImmutable data structures for functional JS
12mThey're functional! They're efficient!!
