Description
Immer (German for: always) is a tiny package that allows you to work with immutable state in a more convenient way. It is based on the copy-on-write mechanism.
The basic idea is that you will apply all your changes to a temporary draftState, which is a proxy of the currentState. Once all your mutations are completed, Immer will produce the nextState based on the mutations to the draft state. This means that you can interact with your data by simply modifying it while keeping all the benefits of immutable data.
Immer alternatives and similar libraries
Based on the "Data Structure" category.
Alternatively, view Immer alternatives based on common mentions on social networks and blogs.
-
immutable-js
Immutable persistent data collections for Javascript which increase efficiency and simplicity. -
mori
ClojureScript's persistent data structures and supporting API from the comfort of vanilla JavaScript -
object-path
A tiny JavaScript utility to access deep properties using a path (for Node and the Browser) -
hashmap
HashMap JavaScript class for Node.js and the browser. The keys can be anything and won't be stringified -
schemapack
Create a schema object to encode/decode your JSON in to a compact byte buffer with no overhead. -
omniclone
An isomorphic and configurable javascript utility for objects deep cloning that supports circular references. -
property-path
Get and set object properties using a string path, where you can specify the separator character in the path.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Immer or a related project?
README
Immer
Create the next immutable state tree by simply modifying the current tree
Winner of the "Breakthrough of the year" React open source award and "Most impactful contribution" JavaScript open source award in 2019
Contribute using one-click online setup
You can use Gitpod (a free online VS Code like IDE) for contributing online. With a single click it will launch a workspace and automatically:
- clone the immer repo.
- install the dependencies.
- run
yarn run start
.
so that you can start coding straight away.
Documentation
The documentation of this package is hosted at https://immerjs.github.io/immer/
Support
Did Immer make a difference to your project? Join the open collective at https://opencollective.com/immer!