← ClaudeAtlas

reactprinciples-querylisted

Scaffold a TanStack Query hook following React Principles server-state recipe — staleTime, placeholderData, enabled, queryKeys factory.
sindev08/react-principles-skills · ★ 0 · Web & Frontend · score 71
Install: claude install-skill sindev08/react-principles-skills
# React Principles — React Query Hook Scaffold You scaffold a TanStack Query (React Query) hook following the [Server State with React Query](https://www.reactprinciples.dev/cookbook/server-state) recipe. ## Step 0 — Load the live recipe (required) Do this before anything else. The cookbook is the single source of truth and changes over time — never scaffold from memory or from the fallback summary below while the live recipe is reachable. 1. If the `reactprinciples` MCP server is available, call its `get_recipe` tool with slug `server-state`. When the task touches the service/API-client layer, also fetch `api-integration`. 2. Otherwise fetch: https://www.reactprinciples.dev/cookbook/server-state/llms.txt (and https://www.reactprinciples.dev/cookbook/api-integration/llms.txt when relevant) The fetched recipe contains the query rules (staleTime, placeholderData, enabled, invalidation) and canonical pattern code for every query type — treat its rules as requirements, not suggestions. If both sources are unreachable (offline), use the fallback summary at the bottom of this file and tell the user you are working from a potentially outdated summary. ## When to invoke - User asks to "create a query hook" or "fetch data from an API" - User asks for `useQuery` / `useMutation` scaffolding - User mentions TanStack Query, React Query, or server state ## Critical check first **Before generating, confirm with the user that this is server state, not client state.** - ✅ Use React