Overview
TanStack Query manages asynchronous data from REST, GraphQL, promises, and other sources together with caching, refetching, pagination, and mutations. It provides framework integrations including React Query, Vue Query, Solid Query, and Svelte Query.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Treat fetching, caching, and refetching as one query lifecycle
Query keys connect remote-data requests with caching, background refetching, cancellation, and synchronization behavior.
Handle pagination, infinite queries, and mutations
Pagination, infinite scrolling, update requests, dependent queries, and cache updates can share the same asynchronous data-management model.
Sources: [2]
For web applications where API synchronization has become repetitive
It fits applications that reuse remote data across screens and want consistent refetch and cache-update behavior instead of bespoke request state everywhere.
Sources: [2]
Separate server state from local UI state
TanStack Query focuses on asynchronously fetched server data. Form drafts, modal visibility, and other purely local state still need an appropriate local state mechanism.
Official sources
- [1]TanStack/query repository(2026-09-21)
- [2]TanStack Query README(2026-09-21)
- [3]React Query installation(2026-09-21)
- [4]@tanstack/react-query package(2026-09-21)
- [5]TanStack Query MIT license(2026-09-21)
Supplemental curator note
TanStack Query primarily manages asynchronous server state rather than all local UI state such as form drafts or modal visibility. The current `@tanstack/react-query` package is 5.103.1 and declares React 18/19 as peer dependencies.
Try it in 3 steps
- 1
Install React Query
Add the official React integration package to the project.
npm i @tanstack/react-query - 2
Provide a QueryClient to the application
Create a QueryClient and provide it through QueryClientProvider.
const queryClient = new QueryClient(); <QueryClientProvider client={queryClient}>…</QueryClientProvider> - 3
Define the first query
Provide a stable query key and fetch function to inspect the basic fetch, cache, and refetch lifecycle.
useQuery({ queryKey: ["todos"], queryFn: fetchTodos })
Growth
Growth trends · Last 30 days
50,342 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 198
- Open PRs
- 119
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- react
- hooks
- fetch
- cache
- async
- rest
- graphql
- data
- query
- stale
- stale-while-revalidate
- update
- Stars
- 50,342
- Forks
- 4,242
- Watchers
- 265
- Open issues
- 53
- Contributors
- 461
- Primary language
- TypeScript
- License
- MIT
- Repository last updated
- Sep 21, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Storybook91,112 Stars
3 shared tag(s) · 1 shared category(s) · Same language
A frontend workshop that isolates UI components and reuses stories across development, Docs, interaction, visual, and accessibility testing.
TypeScript - Builder.io SDKs8,845 Stars
3 shared tag(s) · 1 shared category(s) · Same language
An MIT monorepo of SDKs connecting the Builder.io visual platform to React, Vue, Svelte, Qwik, and other stacks.
TypeScript - Frontman702 Stars
3 shared tag(s) · 1 shared category(s)
An AI coding agent that edits frontend source from browser context including live DOM, computed CSS, and source maps.
ReScript - Redux61,490 Stars
2 shared tag(s) · 2 shared category(s) · Same language
A JavaScript/TypeScript state-management library that centralizes application state in a store and updates it predictably through actions and reducers. Redux Toolkit is the officially recommended approach today.
TypeScript - Expo52,361 Stars
2 shared tag(s) · 2 shared category(s) · Same language
A universal React Native framework for building Android, iOS, and web apps from one project model.
TypeScript
Report incorrect information
Tell us if any listing information is incorrect or outdated.