Tanstack Query

TanStack Query v5 (React Query) server-state management for React: QueryClient and QueryClientProvider setup, custom useQuery hooks, useMutation with error handling, useInfiniteQuery pagination, useSuspenseQuery, query keys, staleTime/gcTime caching, invalidation, prefetching, optimistic updates, and React Query Devtools. Use when adding data fetching to a React app, debugging stale data or caching problems, fixing request waterfalls or background refetching, or migrating React Query v4 to v5 breaking changes: cacheTime renamed to gcTime, isLoading renamed to isPending, required object syntax, initialPageParam required, keepPreviousData removed in favor of placeholderData, and onSuccess/onError query callbacks removed.

jackspace Updated

File contents

jackspace/ClaudeSkillz/tree/main/skills/tanstack-query commit b065562372

Frequently asked questions

npx skillmds@latest add jackspace/tanstack-query