state-handling

Installation
SKILL.md

State Handling — React + TanStack Query

<when_to_use>

  • Building components that fetch data with useQuery or useSuspenseQuery
  • Implementing loading skeletons, error states, or empty states
  • Setting up Suspense boundaries (single or parallel)
  • Server prefetching with HydrateClient to 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>

Query State Pattern

Installs
3
First Seen
Aug 2, 2026
state-handling — leonardoacosta/skills