OSS Tanbou

TanStack Query — manage fetching, caching, refetching, and updates for remote data

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
50,342
Primary language
TypeScript
License
MIT
Repository last updated
Sep 21, 2026

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.

Sources: [2][3]

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.

Sources: [2][4]

Official sources

  1. [1]TanStack/query repository(2026-09-21)
  2. [2]TanStack Query README(2026-09-21)
  3. [3]React Query installation(2026-09-21)
  4. [4]@tanstack/react-query package(2026-09-21)
  5. [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. 1

    Install React Query

    Add the official React integration package to the project.

    npm i @tanstack/react-query
  2. 2

    Provide a QueryClient to the application

    Create a QueryClient and provide it through QueryClientProvider.

    const queryClient = new QueryClient(); <QueryClientProvider client={queryClient}>…</QueryClientProvider>
  3. 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 })
Check the official README

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

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
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.