TanStack/query

🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 42 minutes ago
Added to GitGenius on January 10th, 2024
Created on September 10th, 2019
Open Issues & Pull Requests: 124 (+0)
Number of forks: 4,194
Total Stargazers: 50,196 (+0)
Total Subscribers: 268 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.0 days
Mean response time: 134.2 days
90th percentile: 520.2 days
Tracked items: 746

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 89% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Work labelled "types" is answered fastest, typically in about 17 hours, while "package: angular-query" waits about 11 days. Only 7% of issues opened in the past year have been closed. Three people close 82% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 47
New in 7 days: 2
Closed in 7 days: 43
Avg open age: 370 days
Stale 30+ days: 35
Stale 90+ days: 27

Recent activity

Opened in 7 days: 2
Closed in 7 days: 33
Comments in 7 days: 26
Events in 7 days: 69

Top labels

  • bug (204)
  • works as designed (158)
  • types (100)
  • needs-info (99)
  • released (95)
  • package: vue-query (65)
  • wontfix (62)
  • v5 (60)

Detailed Description

TanStack Query is an asynchronous state management library designed to handle server state operations across multiple JavaScript frameworks. The library provides protocol-agnostic data fetching capabilities that work with REST APIs, GraphQL, promises, and other data sources. It is available in framework-specific implementations including React Query, Solid Query, Svelte Query, and Vue Query, with the core functionality written in TypeScript.

The primary purpose of TanStack Query is to simplify the complex task of managing server state in web applications. It abstracts away the boilerplate typically required for fetching, caching, synchronizing, and updating data from remote sources. The library handles caching strategies including stale-while-revalidate patterns, automatic refetching, and cache invalidation. It supports pagination and infinite scrolling patterns for handling large datasets, allowing developers to implement these common UI patterns without building the logic from scratch.

Beyond basic data fetching, TanStack Query provides mutation handling for server state updates, dependent query management where one query depends on the results of another, and background update capabilities. The library includes prefetching functionality to load data before it is needed, query cancellation to prevent unnecessary network requests, and React Suspense support for frameworks that implement this pattern. Optimistic updates are supported, enabling applications to update the UI immediately while server operations complete in the background.

TanStack Query is part of the larger TanStack ecosystem of libraries that includes routing, form state management, table components, and other utilities. The library is distributed via npm with the core package published as @tanstack/query-core, and framework-specific variants like @tanstack/react-query are available for individual framework implementations.