Loading...
Loading...
TanStack Query (React Query) best practices for data fetching, caching, mutations, and server state management. Activate when building data-driven React applications with server state.
npx skill4agent add deckardger/tanstack-agent-skills tanstack-query-best-practices| Priority | Category | Rules | Impact |
|---|---|---|---|
| CRITICAL | Query Keys | 5 rules | Prevents cache bugs and data inconsistencies |
| CRITICAL | Caching | 5 rules | Optimizes performance and data freshness |
| HIGH | Mutations | 6 rules | Ensures data integrity and UI consistency |
| HIGH | Error Handling | 3 rules | Prevents poor user experiences |
| MEDIUM | Prefetching | 4 rules | Improves perceived performance |
| MEDIUM | Parallel Queries | 2 rules | Enables dynamic parallel fetching |
| MEDIUM | Infinite Queries | 3 rules | Prevents pagination bugs |
| MEDIUM | SSR Integration | 4 rules | Enables proper hydration |
| LOW | Performance | 4 rules | Reduces unnecessary re-renders |
| LOW | Offline Support | 2 rules | Enables offline-first patterns |
qk-qk-array-structureqk-include-dependenciesqk-hierarchical-organizationqk-factory-patternqk-serializablecache-cache-stale-timecache-gc-timecache-defaultscache-invalidationcache-placeholder-vs-initialmut-mut-invalidate-queriesmut-optimistic-updatesmut-rollback-contextmut-error-handlingmut-loading-statesmut-mutation-stateerr-err-error-boundarieserr-retry-configerr-fallback-datapf-pf-intent-prefetchpf-route-prefetchpf-stale-time-configpf-ensure-query-datainf-inf-page-paramsinf-loading-guardsinf-max-pagesssr-ssr-dehydrationssr-client-per-requestssr-stale-time-serverssr-hydration-boundaryparallel-parallel-use-queriesquery-cancellationperf-perf-select-transformperf-structural-sharingperf-notify-change-propsperf-placeholder-dataoffline-network-modepersist-queriesrules/rules/