What problem does it solve? Managing server state in React applications requires handling caching, background refetching, pagination, and optimistic updates manually, which leads to duplicated boilerplate and stale data bugs. ## Core Features & Use Cases - Declarative Data Fetching: Use useQuery with hierarchical query keys for automatic caching, deduplication, and background refetching. - Mutations & Optimistic Updates: Apply useMutation with onMutate rollback patterns to update the UI instantly and sync with the server. - Advanced Patterns: Covers infinite queries, dependent queries, prefetching, Suspense integration, SSR hydration, and testing setup. - Use Case: When building a dashboard that lists paginated todos with add/edit actions, use this Skill to wire up useQuery for the list, useMutation with optimistic updates for edits, and invalidateQueries to keep everything in sync. ## Quick Start Set up TanStack Query in my React app with a QueryClientProvider and write a useQuery hook that fetches and caches a list of todos.