Immer
- Category
- Frameworks and libraries
- Docs outline
- 14 sections
Official docs outline
immerjs.github.io- Introduction
Immer's copy-on-write approach: write mutable-looking code that produces immutable results.
- produce
How produce and draft proxies work, and the rules for recipes.
- Curried produce
Producing reducers and reusable updaters with curried produce.
- Update patterns
Idiomatic ways to update arrays, objects, Maps and Sets.
- Return values
Returning new values from recipes versus mutating drafts, and nothing.
- Pitfalls
Common mistakes such as reassigning the draft, identity checks and non-draftable values.
- Patches
Generating and applying JSON patches for undo/redo and sync.
- Auto freezing
Automatic deep freezing of produced state and how to configure it.
- Classes
Making class instances draftable with immerable.
- Map and Set
Enabling and using Map and Set support.
- current and original
Inspecting draft state with current and original.
- Using with React and use-immer
Using Immer with setState, useState and useReducer.
- Performance
Performance characteristics and optimization tips.
- TypeScript
Typing drafts and produced results.
Each section links to the official page. Titles and summaries by Extra Credit; the docs belong to their authors.