Skip to main content
Run any Skill in Manus
with one click

tanstack-query-best-practices

Stars0
Forks0
UpdatedFebruary 26, 2026 at 06:24

Comprehensive best practices for writing TanStack Query (React Query) v5 code, based on all 31 posts from TkDodo's Practical React Query blog series. Covers query key factories with queryOptions, mutations and invalidation strategies, TypeScript type inference, error handling, data transformations with select, status checks, testing, optimistic updates, and architectural patterns. Use this skill whenever writing, reviewing, or refactoring code that uses TanStack Query — including useQuery, useMutation, queryOptions, queryClient, invalidation, prefetching, or any @tanstack/react-query import. Also use when the user asks about React Query patterns, caching strategies, or server state management. This applies even for small changes like adding a single query hook.

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

File Explorer
2 files
SKILL.md
readonly