state-handling
Installation
SKILL.md
State Handling — React + TanStack Query
<when_to_use>
- Building components that fetch data with
useQueryoruseSuspenseQuery - Implementing loading skeletons, error states, or empty states
- Setting up Suspense boundaries (single or parallel)
- Server prefetching with
HydrateClientto avoid loading spinners on first paint - Deduplicating RSC data fetches with
React.cache() - Reviewing mutation forms for proper pending/error handling
NOT for: routing, caching strategies, Server Actions, auth (use nextjs-app-router skill) NOT for: useEffect decisions, React 19 APIs (use react-dev skill)
</when_to_use>