tanstack-query - Set up and troubleshoot TanStack Query v5 in React
Set up TanStack Query v5 in React with queries, mutations, caching, optimistic updates, infinite scrolling, and v4-to-v5 migration guidance.
Tags
Updated: 2026-12-05Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Configure QueryClient caching
- Create query hooks
- Create mutation hooks
- Implement optimistic updates
- Implement infinite scrolling
- Migrate v4 patterns
- Troubleshoot v5 errors
Inputs
- React project
- API endpoints
- Query data types
- TanStack Query configuration
Outputs
- QueryClient configuration code
- Query and mutation hook code
- React provider setup code
- Migration guidance
- Troubleshooting guidance
Requirements
- React 18.0 or higher
- @tanstack/react-query v5
- TypeScript 4.7 or higher recommended
