tanstack-integration-best-practices

Installation
Summary

Architectural patterns for coordinating TanStack Query, Router, and Start across full-stack applications.

  • Covers setup, data flow, caching, and SSR integration with 13 rules organized by priority and category
  • Emphasizes loader-based data fetching with ensureQueryData, suspense queries in components, and server functions as query sources
  • Provides unified caching and invalidation strategies to prevent duplication and ensure single source of truth
  • Includes automatic SSR dehydration/hydration setup and per-request QueryClient patterns for server-side rendering
SKILL.md

TanStack Integration Best Practices

Guidelines for integrating TanStack Query, Router, and Start together effectively. These patterns ensure optimal data flow, caching coordination, and type safety across the stack.

When to Apply

  • Setting up a new TanStack Start project
  • Integrating TanStack Query with TanStack Router
  • Configuring SSR with query hydration
  • Coordinating caching between router and query
  • Setting up type-safe data fetching patterns

Rule Categories by Priority

Related skills
Installs
1.4K
GitHub Stars
163
First Seen
Jan 20, 2026