TanStack Query
- Category
- Frameworks and libraries
- Docs outline
- 12 sections
Official docs outline
tanstack.com- Important defaults
staleTime, gcTime, refetch triggers, retries and structural sharing defaults.
- Queries
useQuery, query status and fetchStatus, data, error and loading states.
- Query keys and functions
Query key arrays, key hashing, query functions, error throwing and cancellation.
- Caching
Cache lifecycle, stale vs fresh, inactive queries and garbage collection.
- Refetching and background updates
Window focus refetching, background fetching indicators, polling and network mode.
- Mutations
useMutation, side effects, mutation state and persistence.
- Query invalidation
invalidateQueries, query matching, and invalidation after mutation.
- Optimistic updates
UI-based and cache-based optimistic updates, rollback via onError and onMutate.
- Pagination and infinite queries
Paginated queries, placeholder data, useInfiniteQuery, and page params.
- Prefetching
Prefetching, initial data, and placeholder data.
- SSR and hydration
Server rendering, dehydrate and hydrate, and streaming with Suspense.
- Testing
Testing queries with isolated QueryClient and disabling retries.
Each section links to the official page. Titles and summaries by Extra Credit; the docs belong to their authors.