{"schemaVersion":1,"id":"immer","name":"Immer","locale":"en","canonicalUrl":"https://base.akulich.dev/en/library/immer/","officialUrl":"https://github.com/immerjs/immer","isCatalog":false,"description":"Builds immutable state from convenient draft mutations, reducing manual copying of nested objects in reducers and stores.","tasks":["Simplify immutable updates to nested state","Describe draft changes and compare the resulting immutable state"],"categoryIds":["frontend","design"],"subcategoryIds":["frontend.components","design.systems","frontend.state"],"tags":["Immer","UI","Development"],"aliases":["immerjs/immer","immerjs","immer-state","immutable-state-management"],"platforms":[],"stack":[],"compatibility":null,"pricing":"free","freeUsage":"Code and local use under MIT.","paidUsage":"Computing resources, self-hosting, and external services are paid for separately if used.","license":"MIT for the code; dependencies have separate licenses.","selectionGuide":{"purpose":"Simplify immutable updates to nested state","chooseWhen":["Simplify immutable updates to nested state","Describe draft changes and compare the resulting immutable state"],"considerInstead":["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":["Use a unidirectional tree: an object must not appear in the state twice, and cyclic references are not supported."],"limitations":["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."],"faq":[{"question":"What can you use for free in Immer?","answer":"Code and local use under MIT."},{"question":"What additional costs might arise with Immer?","answer":"Computing resources, self-hosting, and external services are paid for separately if used."},{"question":"What terms of use matter for Immer?","answer":"MIT for the code; dependencies have separate licenses."},{"question":"How do you get started with Immer?","answer":"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."},{"question":"Can an object from a closure be safely modified inside produce?","answer":"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":[{"id":"jotai","reason":"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."},{"id":"valtio","reason":"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."},{"id":"zustand","reason":"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":["https://github.com/immerjs/immer","https://raw.githubusercontent.com/immerjs/immer/HEAD/readme.md","https://raw.githubusercontent.com/immerjs/immer/HEAD/LICENSE","https://www.open-source-tools.com/","https://raw.githubusercontent.com/immerjs/immer/main/readme.md","https://raw.githubusercontent.com/immerjs/immer/main/LICENSE","https://immerjs.github.io/immer/pitfalls/"]},"selectionCheckedAt":null,"applicationGuide":{"goal":"Simplify immutable updates to nested state.","inputs":["The original nested state and a reducer that currently copies modified branches manually.","Project code using Immer and reference examples of state changes."],"steps":["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."],"checks":["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."]},"sources":["https://github.com/immerjs/immer","https://raw.githubusercontent.com/immerjs/immer/HEAD/readme.md","https://raw.githubusercontent.com/immerjs/immer/HEAD/LICENSE","https://www.open-source-tools.com/","https://raw.githubusercontent.com/immerjs/immer/main/readme.md","https://raw.githubusercontent.com/immerjs/immer/main/LICENSE","https://immerjs.github.io/immer/pitfalls/"],"checkedAt":"2026-10-06","reviewScope":"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.","relatedIds":["zustand","jotai","valtio","tanstack-query","swr"],"dataVersion":"cbbe7123b47a5ae80983","type":"UI library","kind":"library","pricingNote":"Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.","notes":null,"labeledSources":[{"url":"https://github.com/immerjs/immer","label":"Official source"},{"url":"https://raw.githubusercontent.com/immerjs/immer/HEAD/readme.md","label":"Official source"},{"url":"https://raw.githubusercontent.com/immerjs/immer/HEAD/LICENSE","label":"License"},{"url":"https://www.open-source-tools.com/","label":"Catalog / discovery source"},{"url":"https://raw.githubusercontent.com/immerjs/immer/main/readme.md","label":"Official source"},{"url":"https://raw.githubusercontent.com/immerjs/immer/main/LICENSE","label":"Official source"},{"url":"https://immerjs.github.io/immer/pitfalls/","label":"Official source"}],"licenseGuides":[{"id":"mit","title":"MIT — permissive license","scope":null,"summary":"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.","url":"https://opensource.org/license/mit"}],"entryIds":[],"composition":null}