# Immer

[BASE product page](<https://base.akulich.dev/en/library/immer/>) · [Resource](<https://github.com/immerjs/immer>)

ID: immer · Language: en
Schema version: 1 · Data version: cbbe7123b47a5ae80983

This is editorial data. An unknown field neither confirms nor rules out a capability.
dataVersion is a dataset fingerprint, not evidence of a recent fact check.

Builds immutable state from convenient draft mutations, reducing manual copying of nested objects in reducers and stores\.

## Type

UI library

## Entry type

library

## Separate catalog

No

## [Access conditions](<https://base.akulich.dev/en/library/immer/#resource-access>)

free

## [What you can use for free](<https://base.akulich.dev/en/library/immer/#resource-access>)

Code and local use under MIT\.

## [Paid features and costs](<https://base.akulich.dev/en/library/immer/#resource-access>)

Computing resources, self\-hosting, and external services are paid for separately if used\.

## [Access and limitations](<https://base.akulich.dev/en/library/immer/#resource-access>)

Code and local use under MIT\. Computing resources, self\-hosting, and external services are paid for separately if used\.

## [Use cases](<https://base.akulich.dev/en/library/immer/#resource-tasks>)

- Simplify immutable updates to nested state
- Describe draft changes and compare the resulting immutable state

## Category IDs

- frontend
- design

## Subcategory IDs

- frontend\.components
- design\.systems
- frontend\.state

## Tags

- Immer
- UI
- Development

## Also known as

- immerjs/immer
- immerjs
- immer\-state
- immutable\-state\-management

## [Selection purpose](<https://base.akulich.dev/en/library/immer/#resource-selection>)

Simplify immutable updates to nested state

## [Choose this when](<https://base.akulich.dev/en/library/immer/#resource-selection>)

- Simplify immutable updates to nested state
- Describe draft changes and compare the resulting immutable state

## [Consider alternatives when](<https://base.akulich.dev/en/library/immer/#resource-selection>)

- When choosing for this topic, compare Immer with Jotai\. A candidate to compare under the topic: Design systems, UI components\. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together\.
- When choosing for this topic, compare Immer with Valtio\. A candidate to compare under the topic: Design systems, UI components\. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together\.

## [Requirements](<https://base.akulich.dev/en/library/immer/#resource-selection>)

- Use a unidirectional tree: an object must not appear in the state twice, and cyclic references are not supported\.

## [Limitations](<https://base.akulich.dev/en/library/immer/#resource-selection>)

- Costs and limits of free use: Computing resources, self\-hosting, and external services are paid for separately if used\.
- Terms of use: MIT for the code; dependencies have separate licenses\.
- An object from outside the recipe does not automatically become a draft; changing it may affect original data\.

## [Questions before use](<https://base.akulich.dev/en/library/immer/#resource-faq>)

### What can you use for free in Immer?

Code and local use under MIT\.

### What additional costs might arise with Immer?

Computing resources, self\-hosting, and external services are paid for separately if used\.

### What terms of use matter for Immer?

MIT for the code; dependencies have separate licenses\.

### How do you get started with Immer?

Choose a reducer that manually copies nested objects\. Describe draft changes and compare the resulting immutable state\. Check the original and new state; separately check external objects from the closure and the constraints of a unidirectional tree\.

### Can an object from a closure be safely modified inside produce?

Not automatically\. The documentation warns that external data does not undergo draft conversion simply because it is assigned inside a draft\. Do not modify the original object through such a reference; create a separate copy first if needed\.

## Related resources selected by editors

- jotai: A candidate to compare under the topic: Design systems, UI components\. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together\.
- valtio: A candidate to compare under the topic: Design systems, UI components\. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together\.
- zustand: A candidate to compare under the topic: Design systems, UI components\. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together\.

## Sources for the selection guide

- [https://github\.com/immerjs/immer](<https://github.com/immerjs/immer>)
- [https://raw\.githubusercontent\.com/immerjs/immer/HEAD/readme\.md](<https://raw.githubusercontent.com/immerjs/immer/HEAD/readme.md>)
- [https://raw\.githubusercontent\.com/immerjs/immer/HEAD/LICENSE](<https://raw.githubusercontent.com/immerjs/immer/HEAD/LICENSE>)
- [https://www\.open\-source\-tools\.com/](<https://www.open-source-tools.com/>)
- [https://raw\.githubusercontent\.com/immerjs/immer/main/readme\.md](<https://raw.githubusercontent.com/immerjs/immer/main/readme.md>)
- [https://raw\.githubusercontent\.com/immerjs/immer/main/LICENSE](<https://raw.githubusercontent.com/immerjs/immer/main/LICENSE>)
- [https://immerjs\.github\.io/immer/pitfalls/](<https://immerjs.github.io/immer/pitfalls/>)

## [Possible workflow](<https://base.akulich.dev/en/library/immer/#resource-scenario>)

Simplify immutable updates to nested state\.

A possible workflow; this is not a report of hands-on testing.

## Before you start

- The original nested state and a reducer that currently copies modified branches manually\.
- Project code using Immer and reference examples of state changes\.

## Steps

1. Choose a reducer that manually copies nested objects\.
2. Describe draft changes and compare the resulting immutable state\.
3. Check the original and new state; separately check external objects from the closure and the constraints of a unidirectional tree\.

## Check your result

- Check that the recipe produces the expected new state and that original data is preserved in reference examples\.
- Check for cycles and repeated occurrences of one object in the tree; modify external data through a separate copy\.

## [License](<https://base.akulich.dev/en/library/immer/#resource-license>)

MIT for the code; dependencies have separate licenses\.

## License explanations for the specified scope

### MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed\-source commercial product\. When sharing copies or substantial portions of the code, retain the license text and copyright notice\. You do not need to open\-source your entire project; the author provides no warranties\.

[License terms](<https://opensource.org/license/mit>)

## Related resource IDs

- zustand
- jotai
- valtio
- tanstack\-query
- swr

## [Sources](<https://base.akulich.dev/en/library/immer/#resource-sources>)

- [Official source](<https://github.com/immerjs/immer>)
- [Official source](<https://raw.githubusercontent.com/immerjs/immer/HEAD/readme.md>)
- [License](<https://raw.githubusercontent.com/immerjs/immer/HEAD/LICENSE>)
- [Catalog / discovery source](<https://www.open-source-tools.com/>)
- [Official source](<https://raw.githubusercontent.com/immerjs/immer/main/readme.md>)
- [Official source](<https://raw.githubusercontent.com/immerjs/immer/main/LICENSE>)
- [Official source](<https://immerjs.github.io/immer/pitfalls/>)

## Editorial review date

2026\-10\-06

## Editorial review scope

The purpose, current repository license, and separate terms for code, services, and models have been reviewed\. The product was not run, and no security audit was performed\.

Dates refer to the stated editorial review, not hands-on testing, a product update, or a recent review of all sources.
