TanStack Query Core

Provides TanStack Query Core utilities for caching and fetching async server state in React applications.

7|2|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/salmanrrana/brain-dump --skill tanstack-query-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: TanStack Query Core
Source: https://github.com/salmanrrana/brain-dump/tree/main/.opencode/skill/tanstack-query
Command: npx skills add https://github.com/salmanrrana/brain-dump --skill tanstack-query-core

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

TanStack Query Core solves the challenge of managing asynchronous server state in React apps by offering a robust caching layer, stable query keys, and a declarative data-fetching workflow that reduces boilerplate and avoids stale data.

Core Features & Use Cases

  • Query Options API for type-safe reusable configurations with queryKey and queryFn.
  • Query Factories to organize related queries and share configurations across components.
  • Stable caching and background updates to keep dashboards and lists fresh without extra work.

Quick Start

Install TanStack Query Core and start wiring useQuery or queryOptions in your components to fetch data with stable keys.

Frequently Asked Questions about TanStack Query Core

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

FAQPage Schema
How do I manage async server state in React without stale data?

To manage async server state in React, use a caching layer with stable query keys and declarative data-fetching. This approach reduces boilerplate, prevents stale data, and enables predictable refetch behavior across shared components.

What is the best way to configure type-safe data fetching with query keys?

The best way to configure type-safe data fetching is using a Query Options API. It defines reusable configurations with queryKey and queryFn, ensuring stable caching and type safety across components that share data.

How do I organize related queries to share configurations across components?

You organize related queries by implementing query factories. Factories group shared configurations and query keys, allowing multiple components to reuse the same data-fetching logic while maintaining predictable refetch behavior.

How does caching handle background updates for React dashboards and lists?

Caching handles background updates by keeping dashboards and lists fresh automatically. Stable query keys maintain cached data while background updates fetch new information, reducing extra work and avoiding stale displays.

Can I use useQuery to fetch data with stable keys across shared components?

Yes, you can use useQuery to fetch data with stable keys across shared components. It leverages queryKey-based caching to ensure data is shared predictably and background updates keep the UI fresh.

When do I need query factories for React server state management?

You need query factories when managing server state across multiple components sharing similar data. Factories organize related queries, share configurations, and maintain stable queryKey-based caching to prevent stale data.