nanostores vs @tanstack/react-query

@tanstack/react-query is downloaded 14.5× more often than nanostores (225,327,948 vs 15,511,236 per month), so it has the larger community and more answered questions online. nanostores ships 85% less gzipped JavaScript (2.0 kB vs 13.3 kB), which matters if bundle size is a priority. Both projects are actively maintained.

Metricnanostores@tanstack/react-query
Weekly downloads3,974,54351,850,189
Monthly downloads15,511,236225,327,948
GitHub stars7,40849,542
Minified size4.5 kB45.1 kB
Minified + gzipped2.0 kB13.3 kB
Dependencies01
Open issues24172
Last commit2026-04-302026-06-02
Latest version1.3.05.100.14
LicenseMITMIT

When to choose which

nanostores

Tiny (<1 kB) atomic state shared across frameworks.

Choose it when: Shared state across React/Vue/Svelte/Solid, micro-frontends, or when every byte counts.

  • + Smallest footprint
  • + Cross-framework
  • + Simple
  • - Minimal feature set
  • - Less suited to very large 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

Featurenanostores@tanstack/react-query
ParadigmAtoms (tiny)Async server cache
First-class TypeScript✓ Yes✓ Yes
Works outside React✓ YesPartial
Dedicated devtools✓ Yes✓ Yes
Built-in async / server stateManual✓ Yes
BoilerplateLowLow

nanostores

A tiny (294 bytes) state manager for React/Preact/Vue/Svelte with many atomic tree-shakable stores

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

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

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