jotai vs @tanstack/react-query
@tanstack/react-query is downloaded 13.0× more often than jotai (225,327,948 vs 17,318,930 per month), so it has the larger community and more answered questions online. jotai ships 71% less gzipped JavaScript (3.8 kB vs 13.3 kB), which matters if bundle size is a priority. Both projects are actively maintained.
| Metric | jotai | @tanstack/react-query |
|---|---|---|
| Weekly downloads | 4,384,355 | 51,850,189✓ |
| Monthly downloads | 17,318,930 | 225,327,948✓ |
| GitHub stars | 21,181 | 49,542✓ |
| Minified size | 9.1 kB✓ | 45.1 kB |
| Minified + gzipped | 3.8 kB✓ | 13.3 kB |
| Dependencies | 0✓ | 1 |
| Open issues | 7✓ | 172 |
| Last commit | 2026-06-01 | 2026-06-02✓ |
| Latest version | 2.20.0 | 5.100.14 |
| License | MIT | MIT |
When to choose which
jotai
Bottom-up atomic state for React.
Choose it when: Fine-grained, composable state where you build up from small atoms and want derived/async state with Suspense.
- + Fine-grained reactivity
- + Great derived & async atoms
- + Tiny
- - Atomic mental model takes adjusting
- - Can sprawl in big apps
@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
Feature comparison
| Feature | jotai | @tanstack/react-query |
|---|---|---|
| Paradigm | Atoms (bottom-up) | Async server cache |
| First-class TypeScript | ✓ Yes | ✓ Yes |
| Works outside React | Partial | Partial |
| Dedicated devtools | ✓ Yes | ✓ Yes |
| Built-in async / server state | ✓ Yes | ✓ Yes |
| Boilerplate | Low | Low |
Related comparisons
Embed this comparison
A live badge for your README — it updates as the numbers change.
[](https://devcompare.dev/compare/jotai-vs-tanstack-react-query)Data from npm, Bundlephobia and GitHub. Last updated 2026-06-02.