@tanstack/react-query vs valtio

@tanstack/react-query is downloaded 34.6× more often than valtio (225,327,948 vs 6,521,315 per month), so it has the larger community and more answered questions online. valtio ships 81% less gzipped JavaScript (2.5 kB vs 13.3 kB), which matters if bundle size is a priority. Both projects are actively maintained.

Metric@tanstack/react-queryvaltio
Weekly downloads51,850,1891,718,838
Monthly downloads225,327,9486,521,315
GitHub stars49,54210,187
Minified size45.1 kB6.0 kB
Minified + gzipped13.3 kB2.5 kB
Dependencies11
Open issues1725
Last commit2026-06-022026-06-01
Latest version5.100.142.3.2
LicenseMITMIT

When to choose which

@tanstack/react-query

Async server-state: caching, refetching and mutations.

Choose it when: Managing data from an API — caching, background refetch, pagination, mutations. It complements (not replaces) a client store.

  • + Best-in-class server cache
  • + Great devtools
  • + Handles refetch/stale data
  • - Not for client/UI state
  • - More config than SWR

valtio

Mutate a proxy, React re-renders.

Choose it when: You want to write plain mutable updates (state.count++) and get reactivity for free, with a tiny footprint.

  • + Mutable, intuitive updates
  • + Tiny
  • + Suspense support
  • - Proxy magic can surprise
  • - Smaller ecosystem

Feature comparison

Feature@tanstack/react-queryvaltio
ParadigmAsync server cacheProxy / mutable
First-class TypeScript✓ Yes✓ Yes
Works outside ReactPartial✓ Yes
Dedicated devtools✓ Yes✓ Yes
Built-in async / server state✓ Yes✓ Yes
BoilerplateLowLow

@tanstack/react-query

Hooks for managing, caching and syncing asynchronous and remote data in React

valtio

🧙 Valtio makes proxy-state simple for React and Vanilla

Related comparisons

Embed this comparison

A live badge for your README — it updates as the numbers change.

@tanstack/react-query vs valtio downloads
[![@tanstack/react-query vs valtio](https://devcompare.dev/badge/tanstack-react-query-vs-valtio.svg)](https://devcompare.dev/compare/tanstack-react-query-vs-valtio)

Data from npm, Bundlephobia and GitHub. Last updated 2026-06-02.