Every premium and members-only resource for $9.99/month, as a no-commitment subscription. See the plans

PalateKit

Menu

Request a resource

Describe the resource you are missing in one sentence. We will email you when it is published.

0 / 280

Unlock PalateKit

Unlock everything

Plan

Paying means accepting our terms of sale.

Secure payment by Stripe. Receipts and invoices sent by email.

Welcome back

Sign in to install, download or save this resource. A free account is enough for free resources.

TanStack Query best practices for React v1.0.0

Use this resource to structure data fetching and caching in a React application

New

  • 573 downloads
  • 128 likes
  • 206 saves

Free

Install with the CLI

In a terminal, from the folder you want:

npx --yes palatekit@latest install tanstack-query-best-practices

With no option, the skill goes to ~/.agents/skills/; add --agent claude-code (or codex, cursor…) to target an agent.

First time: connect the CLI with

npx --yes palatekit@latest login

The agent applies TanStack Query rules ranked by priority: query keys, cache durations, invalidation, mutations, error handling, infinite queries and SSR integration. It can also review existing fetching code. You get more predictable data code.

Mostly picked by

Updated November 2, 2026

Card for the “TanStack Query best practices for React” skill

Details

Generates with
Your agent's model
Licence
MIT

Similar resources

View all

What you get

  • rules/cache-stale-time.md: freshness and cache time settings
  • rules/mut-error-handling.md: mutation error handling
  • rules/inf-loading-guards.md: infinite query loading guards

Good fit for

  • Your React app keeps reloading the same data
  • You add mutations with optimistic updates

Not for

    Tags

    • tanstack query
    • react
    • cache
    • server state

    About

    You say

    “Review my fetch hooks to avoid duplicate requests and tune the cache.”

    Card for the “TanStack Query best practices for React” skill

    Skill published by deckardger under the MIT license, delivered in its original version.

    Show more

    How to use it

    1. Install the skill in your agent's skills folder
    2. Ask your agent to structure data fetching and caching in a React application
    3. Review and adjust the result

    Content preview

    Files

    • LICENSE1.1 KB
    • NOTICE-PALATEKIT.md0.5 KB
    • rules/cache-defaults.md2.2 KB
    • rules/cache-gc-time.md2.9 KB
    • rules/cache-invalidation.md3.7 KB
    • rules/cache-placeholder-vs-initial.md4.8 KB
    • rules/cache-stale-time.md2.6 KB
    • rules/err-error-boundaries.md3.7 KB
    • rules/err-fallback-data.md3 KB
    • rules/err-retry-config.md2.6 KB
    • rules/inf-loading-guards.md2.8 KB
    • rules/inf-max-pages.md2.4 KB
    • rules/inf-page-params.md3.6 KB
    • rules/mut-error-handling.md2.6 KB
    • rules/mut-invalidate-queries.md3.8 KB
    • rules/mut-loading-states.md2.4 KB
    • rules/mut-mutation-state.md4.3 KB
    • rules/mut-optimistic-updates.md4 KB
    • rules/mut-rollback-context.md3.5 KB
    • rules/network-mode.md4.6 KB
    • rules/parallel-use-queries.md4 KB
    • rules/perf-notify-change-props.md2.9 KB
    • rules/perf-placeholder-data.md3 KB
    • rules/perf-select-transform.md3.9 KB
    • rules/perf-structural-sharing.md2.5 KB
    • rules/persist-queries.md5 KB
    • rules/pf-ensure-query-data.md2.6 KB
    • rules/pf-intent-prefetch.md3.4 KB
    • rules/pf-route-prefetch.md3 KB
    • rules/pf-stale-time-config.md2.4 KB
    • rules/qk-array-structure.md1.4 KB
    • rules/qk-factory-pattern.md3.1 KB
    • rules/qk-hierarchical-organization.md2.1 KB
    • rules/qk-include-dependencies.md1.9 KB
    • rules/qk-serializable.md2.6 KB
    • rules/query-cancellation.md4.7 KB
    • rules/ssr-client-per-request.md2.9 KB
    • rules/ssr-dehydration.md3.9 KB
    • rules/ssr-hydration-boundary.md3.6 KB
    • rules/ssr-stale-time-server.md2.5 KB
    • SKILL.md4.9 KB

    Origin and licence

    Listed unmodified

    Author
    deckardger
    Source
    github.com/deckardger/tanstack-agent-skills/tree/b2fc14c974b2ca09b38de09c28237f240175205b/skills/tanstack-query
    Licence
    MIT

    Notice

    « tanstack-query-best-practices » (deckardger, MIT) livré dans sa version d'origine : fiche en français et en anglais par PalateKit.

    User reviews

    –

    No ratings yet

    Loading reviews…

    Delete your review?

    Your rating and comment will be removed from the page.