Skip to content

Jotai vs Valtio

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

Valtio

Open source · MIT

A small state library for React and plain JavaScript where you change state like a normal object.

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 Valtio if you need…

  • React developers who want simple shared state without a lot of boilerplate
  • Developers who prefer mutating state directly instead of writing reducers or immutable updates
  • Projects that need state outside components, subscribed to by plain JavaScript code
  • Teams using React 19 who want to read async data with the use hook inside Suspense

Side-by-side

JotaiValtio
TypeLibraryLibrary
PriceFree and open sourceFree and open source
LicenceMITMIT
GitHub stars21.3k10.2k
Setup difficultyBeginnerIntermediate
How you get itInstall with a package managerInstall with a package manager
Main languageTypeScriptTypeScript
Last code update14 days ago7 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.

Valtio

Valtio lets you wrap a JavaScript object in a proxy, then change its properties directly from anywhere in your code. React components that read the state re-render only when the specific parts they use have changed. It works with React and also with plain JavaScript through a vanilla entry point.

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

Valtio

  • React developers who want simple shared state without a lot of boilerplate
  • Developers who prefer mutating state directly instead of writing reducers or immutable updates
  • Projects that need state outside components, subscribed to by plain JavaScript code
  • Teams using React 19 who want to read async data with the use hook inside Suspense

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

Valtio

  • Mutations look like normal JavaScript, so there is little new syntax to learn
  • Components re-render only for the state they actually read, according to the README
  • Works in React and in vanilla JavaScript from the same core idea

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

Valtio

  • Developers who want strictly immutable, reducer-based state, since Valtio uses mutation and snapshots instead
  • Beginners who are not yet comfortable with proxies, as the README notes the snapshot and proxy split can be confusing at first
  • Apps that need Suspense with useTransition to work smoothly, because the README says that pattern suffers from de-opt 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

Valtio

  • Its TypeScript types for useSnapshot can be stricter than some users want, and the README points to a workaround
  • The README notes that this in methods can behave unexpectedly, so arrow functions are recommended
  • Suspense with use still has a de-opt issue that affects useTransition, with a third-party library suggested as a workaround

Getting started

Jotai

Install from npm

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

Valtio

Install the package

npm install valtio
Step-by-step guide: how to use Valtio

Frequently asked questions

What is the difference between Jotai and Valtio?

Jotai: A small React state library where you manage state as independent 'atoms'. Valtio: A small state library for React and plain JavaScript where you change state like a normal object. Jotai suits react developers who want simple shared state without heavy setup, while Valtio suits react developers who want simple shared state without a lot of boilerplate.

Are Jotai and Valtio free?

Jotai: Free and open source. Valtio: Free and open source.

Which is easier to set up, Jotai or Valtio?

Jotai is easier to get started with (rated beginner); Valtio is rated intermediate and usually needs more setup.

Is Jotai or Valtio more popular?

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

What are other alternatives to Jotai and Valtio?

Other options people compare them with include Zustand, Redux Toolkit, XState, MobX.

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.