Skip to content

Jotai vs Zustand

Which should you use? A side-by-side look at what each one does, who it suits, what it costs, how hard it is to set up, and where each falls short.

Jotai

Open source · MIT

A small React state library where you manage state as independent 'atoms'.

Zustand

Open source · MIT

A small React state-management library built on hooks, with no providers needed.

The short answer

Choose Jotai if you need…

  • React developers who want simple shared state without heavy setup
  • Teams that find a single large store too rigid and want state split into small pieces
  • TypeScript projects that want typed state
  • Apps that need derived values or async data fetched from state

Choose Zustand if you need…

  • React developers who want simpler shared state than Redux
  • Apps that need state shared across many components without wrapping them in providers
  • Projects that need to read or update state outside components via getState and setState
  • Developers who want fine control over which state changes trigger re-renders

Side-by-side

JotaiZustand
TypeLibraryLibrary
PriceFree and open sourceFree and open source
LicenceMITMIT
GitHub stars21.3k58.9k
Setup difficultyBeginnerBeginner
How you get itInstall with a package managerInstall with a package manager
Main languageTypeScriptTypeScript
Last code update14 days ago15 days ago

What each one is

Jotai

Jotai is a state management library for React apps. You store pieces of state as small units called atoms, and components read and update them much like React's useState. Atoms can also be derived from other atoms, so values stay in sync automatically. The README says the core API is about 2kb and that it scales from simple use to larger TypeScript applications.

Zustand

Zustand lets React apps keep shared state in a store that components read through a hook. Components subscribe to just the pieces they select and re-render only when those pieces change. The README says it needs no context providers and has a small API, and it can also be used without React.

Best for

Jotai

  • React developers who want simple shared state without heavy setup
  • Teams that find a single large store too rigid and want state split into small pieces
  • TypeScript projects that want typed state
  • Apps that need derived values or async data fetched from state

Zustand

  • React developers who want simpler shared state than Redux
  • Apps that need state shared across many components without wrapping them in providers
  • Projects that need to read or update state outside components via getState and setState
  • Developers who want fine control over which state changes trigger re-renders

Strengths

Jotai

  • Minimal core API, which the README describes as about 2kb
  • Works like React's useState, so the learning curve is small for basic use
  • Derived and async atoms let state logic live alongside the data

Zustand

  • Small, simple API based on hooks, with no providers required
  • Components re-render only when the selected state they read changes
  • Works with async actions and can be used outside React

Not ideal for

Jotai

  • Non-React projects, since the README only shows React usage
  • People who are new to programming, since concepts like derived and async atoms take some learning
  • Teams that prefer a single central store with strict conventions, since Jotai favors small independent atoms

Zustand

  • Teams that require Redux's conventions, tooling, and strict structure, since the README describes zustand as un-opinionated
  • Projects not using React or JavaScript, since the README focuses on JavaScript and React usage and the vanilla core is only a secondary option
  • Adding state inside React Server Components, which the README explicitly advises against because it can cause bugs and privacy issues

Trade-offs

Jotai

  • The README's async examples note that they need React Suspense, which adds setup considerations
  • Atom-based design differs from single-store libraries, so existing patterns may need rethinking
  • The README is truncated here, so advanced features and their limits are not covered in this entry

Zustand

  • The README says to set state immutably and be careful when replacing state, which takes care to get right
  • Some patterns, such as fetching everything or using custom equality, can cause extra re-renders or require extra setup
  • Documentation for the migration to v5 and TypeScript usage is referenced but not included in the truncated README

Getting started

Jotai

Install from npm

npm i jotai
Step-by-step guide: how to use Jotai

Zustand

Install zustand from npm

npm install zustand
Step-by-step guide: how to use Zustand

Frequently asked questions

What is the difference between Jotai and Zustand?

Jotai: A small React state library where you manage state as independent 'atoms'. Zustand: A small React state-management library built on hooks, with no providers needed. Jotai suits react developers who want simple shared state without heavy setup, while Zustand suits react developers who want simpler shared state than redux.

Are Jotai and Zustand free?

Jotai: Free and open source. Zustand: Free and open source.

Is Jotai or Zustand more popular?

Zustand has more GitHub stars (58.9k) than Jotai (21.3k). Popularity isn't the same as fit — check which one matches your use case above.

What are other alternatives to Jotai and Zustand?

Other options people compare them with include Redux Toolkit, Valtio, XState, Redux, TanStack Table.

Keep comparing

Built from our catalogue entries for both products: open-source details come from each project's README (AI-assisted, refreshed weekly) and GitHub data; AI-tool details are editorial. Spotted something wrong? Let us know from either product's page.