@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-query | valtio |
|---|---|---|
| Weekly downloads | 51,850,189✓ | 1,718,838 |
| Monthly downloads | 225,327,948✓ | 6,521,315 |
| GitHub stars | 49,542✓ | 10,187 |
| Minified size | 45.1 kB | 6.0 kB✓ |
| Minified + gzipped | 13.3 kB | 2.5 kB✓ |
| Dependencies | 1 | 1 |
| Open issues | 172 | 5✓ |
| Last commit | 2026-06-02✓ | 2026-06-01 |
| Latest version | 5.100.14 | 2.3.2 |
| License | MIT | MIT |
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-query | valtio |
|---|---|---|
| Paradigm | Async server cache | Proxy / mutable |
| First-class TypeScript | ✓ Yes | ✓ Yes |
| Works outside React | Partial | ✓ Yes |
| Dedicated devtools | ✓ Yes | ✓ Yes |
| Built-in async / server state | ✓ Yes | ✓ Yes |
| Boilerplate | Low | Low |
@tanstack/react-query
Hooks for managing, caching and syncing asynchronous and remote data in React
Related comparisons
Embed this comparison
A live badge for your README — it updates as the numbers change.
[](https://devcompare.dev/compare/tanstack-react-query-vs-valtio)Data from npm, Bundlephobia and GitHub. Last updated 2026-06-02.