Immer helps you create the next immutable state tree by mutating the current one, making it useful for state management patterns like Redux-style reducer logic. It provides documentation at https://immerjs.github.io/immer/ and release notes on its GitHub release page.
Project status
- Actively maintained, with an upstream push and several updates on October 20–22, 2026.
- Recent update activity was unusually dense, with multiple focused updates over a few days; the evidence does not establish a longer-term cadence.
AI summary generated
Recent updates
v11.2.9
Immer v11.2.9 adds `WritableNonArrayDraft` to the exports from `src/immer.ts`. This fixes type generation so the type is included in builds; the diff contains no other changes.
v11.2.8
Immer v11.2.8 fixes patch generation when a modified draft is discarded by assigning its original base value back. The implementation and added tests target this behavior; no public API or signature changes are evident.
v11.2.7
Release v11.2.7 includes a bug fix related to how Immer’s array filter optimization iterates array elements. The change ensures the filter predicate is evaluated against a snapshot of the array length, preventing newly appended elements during predicate execution from being visited.
v11.2.6
v11.2.6 includes a targeted fix related to Draft typing for recursive types involving readonly arrays. The release notes describe avoiding excessive Draft recursion, but the code diff indicates a specific type-level adjustment to how writable drafts are computed for readonly array types.
v11.2.5
v11.2.5 contains a focused bug fix in Immer’s array handling for cases where base objects are relocated to indices that were previously assigned (for example via push, unshift, reverse, sort, splice). The code change ensures those relocated base objects are drafted correctly so mutations apply to drafts rather than the original frozen base.
v11.2.4
v11.2.4 includes a targeted bug fix in Immer's arrayMethods plugin related to how splice start indexes are resolved. It also adds test coverage for splice insertions involving drafts nested inside inserted values.
v11.2.3
v11.2.3 introduces a fix in patch generation for Immer arrays when elements are shifted or reordered. Specifically, it prevents redundant nested patches from being emitted for child objects whose array index no longer corresponds to their original base position.
v11.2.2
v11.2.2 contains a small change to Immer's public TypeScript types, specifically exporting the WritableNonArrayDraft type. The other changes in the diff are documentation site anchor additions in the Chinese website docs.
v11.2.1
v11.2.1 contains a targeted bug fix related to how Immer’s `current()` snapshots handle `Set` drafts. It ensures `Set` snapshots are rebuilt correctly so snapshot values replace draft values without corrupting traversal.
v11.2.0
Release v11.2.0 introduces a new `isModified` helper to detect whether an Immer draft has been modified, including modifications that occurred in nested drafts. The implementation is added to the public API, Flow types, and is covered by a new test suite.
Featuresv11.1.23
Release v11.1.23 contains a single bug fix focused on preserving live Map iteration during draft mutations. The change updates the MapSet plugin so Map iteration methods operate correctly even when the draft is mutated during iteration.
v11.1.22
v11.1.22 ships a bug fix for array search methods (find and findLast) so their iteration bounds are based on the original array length, rather than the array length at each step. This prevents newly appended elements during the predicate from being visited during the same search operation.
v11.1.21
v11.1.21 fixes behavior around revoked Map/Set draft proxies. It ensures that certain read operations on revoked drafts throw immediately instead of potentially proceeding via stale access paths.
v11.1.20
v11.1.20 includes a bug fix for Immer patch generation when a draft property is reassigned to its original base value. Concretely, the internal proxy state tracking no longer treats this as a deletion, and new tests assert that no patches are produced for the “base over draft” assignment case. The release diff also includes additional regression coverage and some dependency and documentation updates.
v11.1.19
Release v11.1.19 primarily fixes Immer's array-methods plugin so that the optional thisArg parameter is forwarded to predicates for array methods like filter and find. The code change is small but behavioral, and is backed by new regression tests. The release also updates documentation and bumps a few website build dependencies in yarn.lock.
v11.1.18
v11.1.18 primarily fixes a TypeScript/typing conflict related to declaring a global `Iterator` variable when compiling against newer ESNext lib definitions. The code change avoids global scope augmentation by feature-detecting `Iterator.from` via `globalThis` instead.
v11.1.17
v11.1.17 is described as a bug fix to preserve structural sharing for no-op array-method calls. The code changes confirm significant work around avoiding unnecessary copies for certain array mutations, but they also include an additional, broader fix in value finalization that is not mentioned in the release notes.
v11.1.16
v11.1.16 is a small bug fix release. It adjusts how the array-methods plugin records inserted indices internally, and adds a regression test to ensure patch generation remains correct after pop and subsequent push.
v11.1.15
v11.1.15 is a TypeScript typing fix for Immer's curried produceWithPatches, aiming to ensure the return type infers the correct State type. The release notes mention correcting the curried produceWithPatches return type, and the code diff confirms this by adding new overloads and tests focused on inference behavior.
v11.1.14
v11.1.14 primarily fixes error handling for Immer patches, ensuring applyPatches reports a proper Immer error instead of a native runtime error when a patch path traverses a null intermediate value. The repository also includes CI and documentation updates related to GitHub Pages and contributor-facing workflows.
Security