Zustand
A small state management library for React that keeps state in an external store and lets components subscribe to just the parts they use.
In more detail
Zustand reads its store through useSyncExternalStore, so it works correctly with concurrent rendering. Components select the slice of state they need and re-render only when that slice changes.
Related terms
- external store — State held outside React, in a library, a module variable or a browser API, which components subscribe to for changes.
- global state — Data kept where any part of a program can read and change it, such as a module-level variable or an app-wide store.
Taught in
- useSyncExternalStore: Tearing-Free Store Subscriptions — React 19 & Modern Component Architecture