tanstack-query

Standardizes TanStack Query v5 server-state management in React projects with typed cache classes and reusable queryOptions factories.

55|5|Updated Feb 1, 2024
One-click install
npx skills add https://github.com/MakePrisms/agicash --skill tanstack-query-makeprisms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-query
Source: https://github.com/MakePrisms/agicash/tree/main/.claude/skills/tanstack-query
Command: npx skills add https://github.com/MakePrisms/agicash --skill tanstack-query-makeprisms

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Centralizes and codifies complex server-side data management patterns in a React project by standardizing how data is fetched, cached, and synchronized with TanStack Query v5.

Core Features & Use Cases

  • Standardized cache-class patterns with typed APIs and version-aware updates.
  • Event-driven cache updates and efficient invalidation strategies to minimize redundant fetches.
  • Reusable queryOptions factories and stable query keys to support suspense and deterministic loading across routes and components.

Quick Start

Configure your components to use the project’s cache patterns and queryOptions to initialize data loading and ensure consistent updates.

Frequently Asked Questions about tanstack-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize React server state management across a large project?

Standardize React server state management by applying centralized cache-class patterns, reusable queryOptions factories, and typed hooks to ensure predictable data loading and minimal network churn.

What is the best way to structure TanStack Query v5 cache updates for real-time data?

The best way to handle real-time cache updates in TanStack Query v5 is using event-driven cache updates and efficient invalidation strategies to minimize redundant fetches while keeping data synchronized.

How do I create stable query keys for suspense queries in React?

Create stable query keys for suspense queries by using reusable queryOptions factories, which support deterministic loading across routes and components while maintaining version-aware cache updates.

Does TanStack Query v5 work with repository integration for data fetching workflows?

Yes, TanStack Query v5 supports repository integration to standardize data workflows across lists, detail views, and real-time updates, applying version-aware caching and mutation patterns for safe data loading.

Why does my React project need collocated front-end patterns for server state?

Collocated front-end patterns are required to maintain safe, predictable data loading and minimal network churn, ensuring cache patterns and typed hooks are consistently applied across various data workflows.

When should I use version-aware caching patterns in TanStack Query?

Use version-aware caching patterns in TanStack Query when standardizing server-state management across data workflows like lists and detail views, ensuring efficient invalidation and deterministic loading across routes.