{"schemaVersion":1,"id":"zustand","name":"Zustand","locale":"en","canonicalUrl":"https://base.akulich.dev/en/library/zustand/","officialUrl":"https://github.com/pmndrs/zustand","isCatalog":false,"description":"A small state library with an external store and subscriptions: connects React components to shared data without extensive boilerplate.","tasks":["Share state between React components","Subscribe components to the required store selectors"],"categoryIds":["frontend","design"],"subcategoryIds":["frontend.components","design.systems","frontend.state"],"tags":["Zustand","UI","Development"],"aliases":["pmndrs/zustand","zustand","state-management-library","bear-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":"Share state between React components","chooseWhen":["Share state between React components","Subscribe components to the required store selectors"],"considerInstead":["When choosing for this topic, compare Zustand with Immer. 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 Zustand 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."],"requirements":["Update state immutably and choose the required selectors. If a selector assembles several values into a new object/array, the README demonstrates useShallow for comparing the result."],"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.","set with replace=true replaces the entire store, including actions. The README also advises against adding state through external store utilities in React Server Components because of possible errors and data leaks between users."],"faq":[{"question":"What can you use for free in Zustand?","answer":"Code and local use under MIT."},{"question":"What additional costs might arise with Zustand?","answer":"Computing resources, self-hosting, and external services are paid for separately if used."},{"question":"What terms of use matter for Zustand?","answer":"MIT for the code; dependencies have separate licenses."},{"question":"How do you get started with Zustand?","answer":"Describe store data and actions that change state. Subscribe components to the required store selectors. Configure styles and check empty, loading, and error states."},{"question":"Why did the action functions disappear after clearing the store?","answer":"In the README, set({}, true) clears the entire store, including actions. Normal set merges new state by default, while its second argument enables full replacement; during reset, explicitly preserve or restore the required model."}],"related":[{"id":"immer","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":"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."}],"sources":["https://github.com/pmndrs/zustand","https://raw.githubusercontent.com/pmndrs/zustand/HEAD/README.md","https://raw.githubusercontent.com/pmndrs/zustand/HEAD/LICENSE","https://www.open-source-tools.com/"]},"selectionCheckedAt":null,"applicationGuide":{"goal":"Share state between React components.","inputs":["The component's design, states, and data.","A compatible framework and the project's styles."],"steps":["Describe store data and actions that change state.","Subscribe components to the required store selectors.","Configure styles and check empty, loading, and error states."],"checks":["The keyboard, focus indicators, and a screen reader let users complete the action.","The component works on a narrow screen and with long data values."]},"sources":["https://github.com/pmndrs/zustand","https://raw.githubusercontent.com/pmndrs/zustand/HEAD/README.md","https://raw.githubusercontent.com/pmndrs/zustand/HEAD/LICENSE","https://www.open-source-tools.com/"],"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":["jotai","valtio","immer","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/pmndrs/zustand","label":"Official source"},{"url":"https://raw.githubusercontent.com/pmndrs/zustand/HEAD/README.md","label":"Official source"},{"url":"https://raw.githubusercontent.com/pmndrs/zustand/HEAD/LICENSE","label":"License"},{"url":"https://www.open-source-tools.com/","label":"Catalog / discovery 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}