Navigate:
TanStack Query
~$QUERY0.2%

TanStack Query: Async state management and data fetching

Declarative server-state caching with automatic background synchronization.

LIVE RANKINGS • 01:58 PM • STEADY
OVERALL
#188
13
FRONTEND
#13
2
30 DAY RANKING TREND
ovr#188
·Front#13
STARS
48.6K
FORKS
3.7K
7D STARS
+119
7D FORKS
+11
See Repo:
Share:

Learn more about TanStack Query

TanStack Query is a JavaScript library for managing asynchronous server state in web applications through automated caching and synchronization mechanisms. It wraps data-fetching logic with intelligent background refetching, automatic cache invalidation, and optimistic updates to keep client-side state synchronized with server data sources. The library implements a query key system that maps data requests to cached entries, enabling automatic deduplication of concurrent requests and efficient cache management across component boundaries. It integrates with popular frontend frameworks like React, Vue, and Solid by providing hooks or primitives that connect component lifecycles to query states. The architecture prioritizes developer experience by handling loading states, error handling, and cache staleness policies declaratively without requiring manual coordination of network requests.

TanStack Query

1

Protocol-agnostic fetching

Works with REST, GraphQL, or any promise-based data source without requiring framework-specific adapters. The same query logic can be reused across different API patterns.

2

Multi-framework support

Provides framework-specific implementations for React, Vue, Svelte, and Solid through separate packages that share a common query-core engine, allowing consistent patterns across different frontend stacks.

3

Built-in cache strategies

Implements automatic cache management with configurable stale-while-revalidate behavior, request deduplication, and background refetching without requiring manual cache invalidation logic in most cases.


import { useQuery } from '@tanstack/react-query';

function UserProfile({ userId }) {
  const { data, isLoading, error } = useQuery({
    queryKey: ['user', userId],
    queryFn: () => fetch(`/api/users/${userId}`).then(res => res.json())
  });

  if (isLoading) return <div>Loading...</div>;
  if (error) return <div>Error: {error.message}</div>;
  return <div>{data.name}</div>;
}

v@tanstack/vue-query@5.92.9

Updates query-core dependency to version 5.90.20

  • Updated dependencies: @tanstack/query-core@5.90.20
v@tanstack/svelte-query-persist-client@6.0.20

Updates persist client core and svelte query dependencies

  • Updated dependencies: @tanstack/query-persist-client-core@5.91.19
  • @tanstack/svelte-query@6.0.18
v@tanstack/solid-query-persist-client@5.90.23

Updates persist client core and solid query dependencies

  • Updated dependencies: @tanstack/query-persist-client-core@5.91.19
  • @tanstack/solid-query@5.90.23

See how people are using TanStack Query

Loading tweets...


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers