What problem does it solve? Managing server state in React applications requires handling caching, background refetching, pagination, and synchronization manually, which leads to duplicated logic and stale data bugs. ## Core Features & Use Cases - Declarative Data Fetching: Use useQuery with hierarchical query keys for automatic caching, deduplication, and stale-while-revalidate behavior. - Mutations & Optimistic Updates: Apply useMutation with onMutate snapshots, rollback on error, and query invalidation to keep UI and server in sync. - Advanced Patterns: Infinite queries, dependent queries, prefetching, Suspense integration, and SSR hydration via dehydrate/HydrationBoundary. - Use Case: Build a paginated todo list where page changes keep previous data visible via placeholderData, and adding an item optimistically updates the cache before the server responds. ## Quick Start Set up a QueryClientProvider with a configured QueryClient and fetch data in a component using useQuery with a query key and query function.