1. React
  2. ReactNext
  3. 2018
  4. Immer, Immutability and the Wonderful World of Proxies

Immer, Immutability and the Wonderful World of Proxies

Michel Weststrate at ReactNext 2018

Immer is a tiny package that allows you to work with immutable data structures with unprecedented ease. It doesn't require learning new data structures or update APIs, but instead creates a temporarily shadow tree which can be modified using the standard JavaScript APIs. The shadow tree will be used to generate your next immutable state tree. This shadow tree is maintained using Proxies. Proxies are an exotic javascript feature that is nowadays available in all modern browsers. What are they, how do they work and why should you (not) use them? Join this talk to learn more about Proxies, or about how to deal with immutability data structures with a better DX as was ever possible so far. Brace yourself; your reducers will become twice as short without giving up on any of the semantic constraints. Slides for the talk: (including source code of the demos): http://immer-react-next-2018.surge.sh