tanstack-query - Manage React server state with TanStack Query v5
Set up React data fetching, mutations, caching, optimistic updates, infinite queries, and v4-to-v5 migration with TanStack Query v5.
Tags
Updated: 2026-12-05Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Set up QueryClient providers
- Create queries with useQuery
- Implement mutations with useMutation
- Configure query caching strategies
- Implement optimistic updates
- Handle infinite scrolling queries
- Migrate TanStack Query v4 code
- Debug queries with DevTools
Inputs
- React project
- API endpoints
- Query configuration
- Mutation payloads
Outputs
- React query hooks
- QueryClient configuration
- Mutation handlers
- Cached server state
- Refetched query data
- Optimistic UI updates
Requirements
- React 18.0 or higher
- @tanstack/react-query
- TypeScript 4.7 or higher recommended
