tanstack-query-expert

Featured

Expert in TanStack Query (React Query) — asynchronous state management. Covers data fetching, stale time configuration, mutations, optimistic updates, and Next.js App Router (SSR) integration.

AI & Automation 39,350 stars 6386 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# TanStack Query Expert You are a production-grade TanStack Query (formerly React Query) expert. You help developers build robust, performant asynchronous state management layers in React and Next.js applications. You master declarative data fetching, cache invalidation, optimistic UI updates, background syncing, error boundaries, and server-side rendering (SSR) hydration patterns. ## When to Use This Skill - Use when setting up or refactoring data fetching logic (replacing `useEffect` + `useState`) - Use when designing query keys (Array-based, strictly typed keys) - Use when configuring global or query-specific `staleTime`, `gcTime`, and `retry` behavior - Use when writing `useMutation` hooks for POST/PUT/DELETE requests - Use when invalidating the cache (`queryClient.invalidateQueries`) after a mutation - Use when implementing Optimistic Updates for instant UX feedback - Use when integrating TanStack Query with Next.js App Router (Server Components + Client Boundary hydration) ## Core Concepts ### Why TanStack Query? TanStack Query is not just for fetching data; it's an **asynchronous state manager**. It handles caching, background updates, deduplication of multiple requests for the same data, pagination, and out-of-the-box loading/error states. **Rule of Thumb:** Never use `useEffect` to fetch data if TanStack Query is available in the stack. ## Query Definition Patterns ### The Custom Hook Pattern (Best Practice) Always abstract `useQuery` calls into custom hoo...

Details

Author
sickn33
Repository
sickn33/antigravity-awesome-skills
Created
4 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Featured

tanstack-query-expert

Expert in TanStack Query (React Query) — asynchronous state management. Covers data fetching, stale time configuration, mutations, optimistic updates, and Next.js App Router (SSR) integration.

27,705 Updated today
davila7
AI & Automation Listed

tanstack-query-best-practices

TanStack Query (React Query) best practices for data fetching, caching, mutations, and server state management. Activate when building data-driven React applications with server state.

11 Updated today
wordbricks
AI & Automation Solid

react-query

TanStack Query (React Query) patterns for server state management, caching, mutations, optimistic updates, and infinite queries.

1,160 Updated today
a5c-ai
Data & Documents Listed

tanstack

Build type-safe React apps with TanStack Query (data fetching, caching, mutations), Router (file-based routing, search params, loaders), and Start (SSR, server functions, middleware). Use when working with react-query, data fetching, server state, routing, search params, loaders, SSR, server functions, or full-stack React. Triggers on tanstack, react query, query client, useQuery, useMutation, invalidateQueries, tanstack router, file-based routing, search params, route loader, tanstack start, createServerFn, server functions, SSR.

29 Updated 6 days ago
tenequm
AI & Automation Listed

tanstack-query-patterns

Auto-enforce TanStack Query best practices with factory key pattern. Activates when creating queries, mutations, managing server state, or implementing data fetching in React applications.

3 Updated 1 weeks ago
smicolon