# Zustand

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

ID: zustand · 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.

A small state library with an external store and subscriptions: connects React components to shared data without extensive boilerplate\.

## Type

UI library

## Entry type

library

## Separate catalog

No

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

free

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

Code and local use under MIT\.

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

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

## [Access and limitations](<https://base.akulich.dev/en/library/zustand/#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/zustand/#resource-tasks>)

- Share state between React components
- Subscribe components to the required store selectors

## Category IDs

- frontend
- design

## Subcategory IDs

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

## Tags

- Zustand
- UI
- Development

## Also known as

- pmndrs/zustand
- zustand
- state\-management\-library
- bear\-state\-management

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

Share state between React components

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

- Share state between React components
- Subscribe components to the required store selectors

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

- 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](<https://base.akulich.dev/en/library/zustand/#resource-selection>)

- 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](<https://base.akulich.dev/en/library/zustand/#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\.
- 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\.

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

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

Code and local use under MIT\.

### What additional costs might arise with Zustand?

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

### What terms of use matter for Zustand?

MIT for the code; dependencies have separate licenses\.

### How do you get started with Zustand?

Describe store data and actions that change state\. Subscribe components to the required store selectors\. Configure styles and check empty, loading, and error states\.

### Why did the action functions disappear after clearing the store?

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 resources selected by editors

- 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\.
- 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\.

## Sources for the selection guide

- [https://github\.com/pmndrs/zustand](<https://github.com/pmndrs/zustand>)
- [https://raw\.githubusercontent\.com/pmndrs/zustand/HEAD/README\.md](<https://raw.githubusercontent.com/pmndrs/zustand/HEAD/README.md>)
- [https://raw\.githubusercontent\.com/pmndrs/zustand/HEAD/LICENSE](<https://raw.githubusercontent.com/pmndrs/zustand/HEAD/LICENSE>)
- [https://www\.open\-source\-tools\.com/](<https://www.open-source-tools.com/>)

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

Share state between React components\.

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

## Before you start

- The component's design, states, and data\.
- A compatible framework and the project's styles\.

## Steps

1. Describe store data and actions that change state\.
2. Subscribe components to the required store selectors\.
3. Configure styles and check empty, loading, and error states\.

## Check your result

- 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\.

## [License](<https://base.akulich.dev/en/library/zustand/#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

- jotai
- valtio
- immer
- tanstack\-query
- swr

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

- [Official source](<https://github.com/pmndrs/zustand>)
- [Official source](<https://raw.githubusercontent.com/pmndrs/zustand/HEAD/README.md>)
- [License](<https://raw.githubusercontent.com/pmndrs/zustand/HEAD/LICENSE>)
- [Catalog / discovery source](<https://www.open-source-tools.com/>)

## 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.
