📄️ Auto Freeze
Enable autoFreeze, and return frozen state, and enable circular reference checking only in development mode.
📄️ Currying
Mutative allows for the creation of more modular and reusable state manipulation functions. This is achieved through a technique called currying, which transforms a function that takes multiple arguments into a sequence of functions.
📄️ Marking data structure
Mark options provides additional controls or flags to determine immutability or mutability of data nodes in drafts function execution process, or customize shallow copy for creating drafts.
📄️ Patches
Enable patch, and return the patches and inversePatches.
📄️ Strict Mode
Strict mode in Mutative is a feature designed to reinforce the library’s immutability guarantees by ensuring that state mutations adhere to the principles of immutable update patterns.
📄️ Typescript
Mutative support is built into the typescript types. You can use the Draft and Immutable types to annotate your code.
📄️ Migration from Immer to Mutative
Mutative is a drop-in replacement for Immer, so you can use it with a few changes.