AiSkillz

Early "As-Is" Access - free for the first 20 accounts. 18 of 20 places left: complete registration to claim one. No credit card needed.

← Back to skills
LibrariesVia MCPAny / model-agnosticLicense: My own work (all rights reserved)

Server state with TanStack Query

Created by CodeCraft LLC

Build, advise on, and review server-state management with TanStack Query (React Query) v5

Product and technology names are trademarks of their respective owners, used only to identify what this skill covers. CodeCraft LLC is not affiliated with or endorsed by them.

by Jace (@jamick)v1.4.3 · updated 2026-12-01Report copyright infringement

Description

Build, advise on, and review server-state management with TanStack Query (React Query) v5 — query keys and queryOptions, staleTime vs gcTime, mutations and invalidation, optimistic updates, infinite queries, Suspense queries, prefetching and SSR hydration (Next.js App Router, HydrationBoundary), React Native focus/online handling, error handling, and devtools. Use whenever @tanstack/react-query is installed or the user fetches/caches API data on the client, asks why data refetches too often or is stale, needs pagination/infinite scroll, or wants to replace useEffect fetching.

#libraries#tanstack#query

Included with all-access

$5.00 one-time, permanent access

Get all-access · $12.00/mo, billed yearly

or

Buy 2 or more together for up to 40% off · View cart

You get a licence, not ownership. Access lasts while this skill is available on AiSkillz; if it's removed within 90 days of purchase, we'll send you a copy to keep. Terms

Official and free skills are included with the all-access subscription

Changelog

Subscribers also see which files changed in each version.

v1.4.3Dec 1, 2026Latest

Changed

  • README **Sources**: links now point at the publisher's openly licensed GitHub copy of the same docs (CC BY 4.0, Apache 2.0, MIT or the W3C Software and Document License), so the skill rests on the open license rather than the website's terms of use.
v1.4.2Dec 1, 2026

Added

  • README: a **Sources** line listing the official pages the skill is written from, each link checked, so the source-overlap check can run against them.
v1.4.1Nov 29, 2026

Changed

  • SSR helper note: the Advanced SSR guide uses environmentManager.isServer(); the claim that the isServer export is deprecated isn't stated there, so it's now worded as "older examples". Version note: v5.108, no v6 announced.
v1.4.0Nov 20, 2026

Added

  • Review method: every code review starts by mapping the code flows in scope and gives each flow its own sub-agent at high effort, which reviews that flow end to end against this checklist; the main agent merges, re-checks Blockers and de-duplicates. Covers single-flow reviews, nested sub-agents, failed sub-agents and environments without sub-agents.
v1.3.0Nov 6, 2026

Changed

  • Review report rule: reviews that cover changes (a diff, PR or uncommitted work) open with a short "What the changes do" section - factual bullets grouped by purpose, inferred intent marked, deploy or migration impact stated.
v1.2.0Nov 4, 2026

Changed

  • Review report rule at the top of the skill, loaded before any review: one entry per finding as Level · type · file:line · finding · proposed fix, outside facts sourced or marked unverified, and no narrative.
v1.1.0Oct 30, 2026

Added

  • Current optimistic-update callback signatures (onMutate(variables, context), onError(err, variables, onMutateResult, context), context.client).
  • Optional streaming of pending queries with shouldDehydrateQuery (v5.40.0+).
  • enabled: false instead of skipToken when manual refetch is needed.
  • Checklist item for deprecated isServer and losing the browser client on suspend.

Changed

  • SSR client creation: the getQueryClient() pattern (new client per server request, browser singleton, environmentManager.isServer()) is now primary; useState is a fallback with the Suspense-boundary caveat. The isServer export is deprecated.

Fixed

  • Version check notes that environmentManager needs 5.91.0+ and that the mutation context argument is recent; on older versions, fall back to isServer and a closed-over client.
  • Checklist: enabled: false (not skipToken) for queries that call refetch(); onMutateResult/context.client where supported.
  • The SSR recipe gets its client from getQueryClient(); the Suspense caveat was reworded.
v1.0.1Oct 3, 2026

Changed

  • Renamed the title to describe what the skill does with the product, so it doesn't read as an official or endorsed edition.
  • Added a trademark notice to the README.
v1.0.0Oct 2, 2026

Added

  • First release.