Zustand
zustand.docs.pmnd.rs
Zustand: Introduction
Index of documentation for pmndrs/* libraries
GitHub
github.com › pmndrs › zustand
GitHub - pmndrs/zustand: 🐻 Bear necessities for state management in React
State has to be updated immutably and the set function merges state to help it. import { create } from 'zustand' const useBearStore = create((set) => ({ bears: 0, increasePopulation: () => set((state) => ({ bears: state.bears + 1 })), ...
Starred by 57.9K users
Forked by 2K users
Languages TypeScript 97.9% | JavaScript 2.1%
Do I need Zustand?
You don't need anything. I'd say for the most part it's just a nicer and less boilerplaty API than Context, you just create a store with values and setters and start consuming them, as well as having some extremely nice middleware to mirror your stores into localStorage or sessionStorage without even thinking about it. It'll also not re-render the entire tree on changes (which supposedly Context does, but people still debate every single day whether this is true or not so regardless of what I say someone is gonna tell me elsewise), but only the components that are dependent on the data changing. More on reddit.com
Downsides to Zustand & React Query at scale?
Hey there, I had similar concerns about zustand vs redux at scale recently and I couldn’t really find any answers online with actual experience of using zustand at scale. Based on my own research though, I think you can scale zustand up by splitting the store into slices . Redux Toolkit (RTK) also uses this pattern with its createSlice api. However, if you’re using zustand with typescript, you’ll need to add type annotations accordingly, see here. With that being said, i recently started using react query on one of my projects, and it seems to scale very well. The app is basically just a lot of CRUD functionality in isolated modules. So there’s a lot of server state which react query manages very nicely. In fact, we haven’t had to use any global client state manager like zustand or redux yet. So maybe you can also consider whether you’ll have any truly global client state that needs to be stored in zustand or redux. You can read more about this here. Edit: grammar More on reddit.com
Redux Vs Zustand
Wait until you see the other two state frameworks the Zustand guy made More on reddit.com
Zustand = 🔥
Zustand is amazing. I hope it will keep growing and eventually overthrow Redux More on reddit.com
Videos
05:00
5 Zustand BEST Practices in 5 Minutes - YouTube
Zustand Beginner Tutorial - Learn React State Management ...
16:39
📝 React and Zustand Unite: The Ultimate Todo List Tutorial - ...
01:04:35
React State Management with Zustand & TypeScript - YouTube
01:15:24
Zustand React State Management Course (Simple Redux Alternative) ...
Zustand
zustand-demo.pmnd.rs
Zustand
🐻 Bear necessities for state management in React
GeeksforGeeks
geeksforgeeks.org › typescript › introduction-to-zustand
Zustand State Management Guide for React & Next.js - GeeksforGeeks
September 6, 2025 - Indirect State Managers: Libraries like React Router (for routing) and React Query (for data fetching) can handle state indirectly when combined with native hooks. Direct State Managers: Dedicated libraries like Redux, Zustand, Jotai, and Valtio are used specifically for global state management.
Js
react-tracked.js.org › person name (zustand)
Tutorial with zustand - Person Name | React Tracked
import * as React from 'react'; import { useState } from 'react'; import create from 'zustand'; import { createTrackedSelector } from 'react-tracked'; const useStore = create((set) => ({ firstName: 'React', lastName: 'Tracked', setFirstName: (firstName) => set({ firstName }), setLastName: (lastName) => set({ lastName }), })); const useTrackedStore = createTrackedSelector(useStore); const EditPerson = () => { const state = useTrackedStore(); return ( <div> <div> First Name: <input value={state.firstName} onChange={(e) => state.setFirstName(e.target.value)} /> </div> <div> Last Name: <input valu
YouTube
youtube.com › watch
Zustand - Complete Tutorial - YouTube
✨ Cosden Code → https://cosdencode.com📥 Import React (Newsletter) → https://cosden.solutions/newsletter?s=ytdJoin The Discord! → https://discord.cosdensolu...
Published December 18, 2023
The Software House
tsh.io › blog › zustand-react
Zustand. React state management set up in a few minutes
February 21, 2023 - This is really important because this is exactly how you modify the store data in Zustand! It’s really similar to how you modify state in React because in order to achieve that you need to call setState() function or your custom state-setting function coming from u_seState_ hook. Back to our example – the last thing we did was to pass the state argument to set() callback and return the modified data.
CodeSandbox
codesandbox.io › examples › package › zustand
zustand examples - CodeSandbox
react-three-fiber-starterreact-three-fiber with react-spring · zustand-persist-example · roadmanfong · zustand-react-ts · wangyu.frontend · hackboxA fully open-sourced light weight web IDE · Three-fiber-template · mwwalex · game · raycast-vehicleUsing use-cannon / cannon-es to implement a raycast vehicle.
Medium
medium.com › @masoudit › the-complete-guide-to-using-zustand-as-a-state-manager-in-a-react-app-c63c88fe7729
Using Zustand in a React App with Complete Example | by MasoudIt | Medium
January 21, 2024 - To witness the results firsthand, run the project and explore the complete demo showcasing the implementation of Zustand in a sample project. You can find the code in the following repository: React Summit GitHub Repository. In addition to the code above, you’ll discover another example demonstrating the use of Zustand, specifically featuring the Persist API.
TkDodo
tkdodo.eu › blog › working-with-zustand
Working with Zustand
November 20, 2022 - One of them that I quickly grew to like was Zustand (opens in a new window). It’s a tiny library (v4.1.4 is 1.1kB Minified + Gzipped) that provides a simple API to create global state stores and subscribe to them via selectors. This pattern is conceptually similar to what Redux is doing, which is already known by many developers. Much like React itself, Zustand is not opinionated.
npm
npmjs.com › package › zustand
zustand - npm
March 16, 2026 - State has to be updated immutably and the set function merges state to help it. import { create } from 'zustand' const useBearStore = create((set) => ({ bears: 0, increasePopulation: () => set((state) => ({ bears: state.bears + 1 })), ...
» npm install zustand
Published Mar 16, 2026
Version 5.0.12
Awesomedevin
awesomedevin.github.io › zustand (react)
zustand (React) | ZUSTAND
import { create } from 'zustand' const useBearStore = create((set) => ({ bears: 0, increasePopulation: () => set((state) => ({ bears: state.bears + 1 })), removeAllBears: () => set({ bears: 0 }), }))