SKILL

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.

Target: React / Next.js. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • TanStack Query Expert
  • When to Use This Skill
  • Core Concepts
  • Why TanStack Query?
  • Query Definition Patterns
  • The Custom Hook Pattern (Best Practice)
  • Advanced Query Keys
  • Mutations & Cache Invalidation

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. 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) 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 Tan

This is an excerpt. Refer to the complete source and its current requirements.

Source repository
davila7/claude-code-templates
Source file
cli-tool/components/skills/web-development/tanstack-query-expert/SKILL.md
Fixed revision
21be197f100a12b8d0dd9a211cc244c8179f84d3
Read the complete original documentation ↗

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: davila7/claude-code-templates · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T15:01:40.894Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.