tanstack-query Documentation
TanStack Query (React Query) documentation. Use for server state management, data fetching, caching, queries, mutations, and React/Vue/Solid/Svelte/Angular query integration.
Quick Reference
| Task | Entry Point |
|------|-------------|
| React quick start | contents/framework/react/quick-start.md |
| Angular quick start | contents/framework/angular/quick-start.md |
| Vue quick start | contents/framework/vue/quick-start.md |
| Solid quick start | contents/framework/solid/quick-start.md |
| Core API (QueryClient) | contents/reference/QueryClient.md |
| useQuery hook (React) | contents/framework/react/reference/useQuery.md |
| useMutation hook (React) | contents/framework/react/reference/useMutation.md |
| Caching guide | contents/framework/react/guides/caching.md |
| SSR guide | contents/framework/react/guides/ssr.md |
| ESLint plugin | contents/eslint/eslint-plugin-query.md |
When to use
Use this skill when the user asks about:
- Fetching, caching, syncing, and updating server state with React, Vue, Solid, Svelte, or Angular
- useQuery, useMutation, useInfiniteQuery, useQueries, useSuspenseQuery hooks
- QueryClient methods (invalidateQueries, prefetchQuery, setQueryData, etc.)
- Query keys, query functions, and query options patterns
- Optimistic updates, mutations, and cache invalidation
- SSR, hydration, dehydration, and streaming with TanStack Query
- Background refetching, stale time, gc time, network mode
- Persistence plugins (localStorage, AsyncStorage, broadcastQueryClient)
- ESLint plugin rules for TanStack Query
- TypeScript usage with TanStack Query
How to find information
- First, read
TOC.mdfor complete file listing organized by directory - Identify the relevant framework (react/angular/vue/solid/svelte) and topic
- Read specific files for details
TOC.md contains all files organized by directory — always check it first.