# immerjs/immer

Create the next immutable state by mutating the current one

Repository: https://github.com/immerjs/immer
Canonical: https://ross.abutalabs.com/products/immer
Homepage: https://immerjs.github.io/immer/
Language: JavaScript
License: MIT
License Family: permissive
Topics: immutable, immutables, reducer, redux, state-tree
Last push: 2026-08-19T07:57:23+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 98, longevity 100
- inputs: {"age_days": 3169, "days_push": 14, "days_rel": 14, "gap_med": 3.5, "n_releases_24m": 23}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 28980, forks 880 (observed 2026-08-28T04:11:52.979447+00:00)

## What it is
Immer is a tiny JavaScript library that lets you work with immutable state by writing code that mutates a draft copy, producing the next immutable state tree. It is widely used with React state, Redux reducers, and configuration management.

## Use cases
- simplify immutable updates in redux reducers
- manage react state without spread boilerplate
- create next immutable state by mutating current one
- detect accidental mutations of state objects
- perform deep updates on nested state trees
- share unchanged parts of state trees in memory

## When to choose
- you use React or Redux and want ergonomic immutable updates
- you need efficient structural sharing and change detection
- you want automatic detection of accidental mutations

## When to avoid
- your state is small and simple enough that spread operators suffice
- you work outside the JavaScript ecosystem
- you need truly persistent data structures rather than copy-on-write snapshots

## Facets
- artifact type: library
- maturity: stable
- function: state-management, serialization
- domain: frontend, web-development, developer-tools
- platform: browser
- tags: immutable-state, redux, react, copy-on-write, javascript, nodejs

## Member repositories
- immerjs/immer (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:52.979447+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:53:16.334052+00:00, confidence not recorded.
  - readme: https://github.com/immerjs/immer (fetched 2026-08-28T04:11:52.979447+00:00, sha aa4c25aa3b25)
  - homepage: https://immerjs.github.io/immer/ (fetched 2026-08-29T07:50:40.560253+00:00, sha 74618fef2263)
- Data as of 2026-08-30T08:39:29.467469+00:00.
