tanstack-query
Installation
SKILL.md
TanStack Query
Use this skill to apply current, source-backed TanStack guidance. Keep answers aligned with installed package source first, official TanStack docs second, and package-shipped skills third. Read references/current-authority.md when APIs, versions, CLI commands, or source freshness materially affect the task.
Decision Tree
- Need server-state cache? Use Query with stable
queryOptionsand hierarchical keys. - Need live Convex subscriptions? Let Convex own live state; do not duplicate it into Query unless using the Convex Query adapter intentionally.
- Need route prefetch? Use the same
queryOptionsin loaders and components. - Need mutation UI? Choose invalidation, optimistic cache update, or UI-level optimistic variables based on scope.