TanStack Query
Powerful asynchronous server-state management — fetching, caching, syncing and updating data in React, Vue, Solid and more.
TanStack Query (formerly React Query) treats data from APIs as server state with its own cache, deduplicating requests and refetching stale data automatically. It handles pagination, infinite queries, optimistic updates and retries declaratively. Adapters exist for React, Vue, Svelte, Solid and Angular.
- Type
- Library
- Category
- Web
- Maintainer
- TanStack (Tanner Linsley, Dominik Dorfmeister)
- First released
- 2019
- License
- Open source (MIT)
- Pricing
- Open source
- Level
- Intermediate
- Technologies
- react, vue, solid, typescript
- GitHub stars
- 50,843
- Weekly downloads
- 95,054,690 (npm)
- Latest release
- [object Object]
- Last verified
- 26 Nov 2026
What TanStack Query is used for
- Fetching and caching API data
- Optimistic UI updates
- Infinite scroll and pagination
Strengths
- Removes most hand-written loading/caching code
- Excellent devtools
- Framework-agnostic core
Limitations
- Cache-key design needs discipline
- Overlaps with framework data loaders in SSR frameworks
TanStack Query alternatives
How it relates to other tools
- TanStack Query works with React
- TanStack Query works with tRPC
- TanStack Query works with TanStack Start
Built with the same technologies
Official links
- Official website
- Documentation
- Source code (TanStack/query)
- npm: @tanstack/react-query