tanstack-query-fetching-and-cache
TanStack Query Fetching and Cache
Use this skill when the task is about read-side server-state flows, not server rendering or write-side mutation orchestration.
Scope
- query-key design and query-function structure
useQuery,useQueries,useInfiniteQuery, and client-sideuseSuspenseQuery- dependent, parallel, paginated, and infinite-query selection
- cache freshness defaults like
staleTimeandgcTime - invalidation, refetching filters, retries, and cancellation
Routing cues
useQuery,useQueries,useInfiniteQuery, "why is this refetching", "how should I structure query keys", or "why did this cache entry disappear" -> this skilluseMutation, optimistic updates, invalidation from mutation callbacks, persistence, or offline resumes ->tanstack-query-mutations-and-sync- server prefetching, hydration, Next.js, streaming, or
HydrationBoundary->tanstack-query-integration-and-rendering queryOptionstyping,skipToken, module augmentation, tests, or ESLint rules ->tanstack-query-typescript-and-tooling
More from dobroslavradosavljevic/skills
base-ui-typescript-surface
Use for Base UI namespace contracts, change event types, generic render types, and wrapper typing patterns.
4base-ui-basic-primitives
Use for simple primitives with low integration complexity (Avatar, Button, Meter, Progress, Scroll Area, Separator).
4base-ui-root-providers
Use for CSP Provider, Direction Provider, and useDirection when wiring Base UI at the app root or across portals.
4base-ui-menus-navigation-and-toast
Use for Menu, Context Menu, Menubar, Navigation Menu, Toolbar, Toast, and shared command-surface patterns such as detached triggers and menu payloads.
4base-ui-forms-and-validation
Use for Base UI Field/Form primitives, validation flows, form controls, and advanced Number Field, Slider, and RadioGroup behavior.
4base-ui-disclosure-and-tabs
Use for stateful visibility components (Accordion, Collapsible) and tab navigation semantics.
4