tanstack-integration-best-practices

Coordinate TanStack Query, Router, and Start for SSR and data flow.

4|Updated Jan 6, 2026
One-click install
npx skills add https://github.com/smart-village-solutions/sva-studio --skill tanstack-integration-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-integration-best-practices
Source: https://github.com/smart-village-solutions/sva-studio/tree/main/.agents/skills/tanstack-integration-best-practices
Command: npx skills add https://github.com/smart-village-solutions/sva-studio --skill tanstack-integration-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TanStack integration best practices help teams coordinate TanStack Query, Router, and Start to deliver reliable data flows, SSR, and caching coordination across full-stack apps.

Core Features & Use Cases

  • Guidance for setting up TanStack Start projects, integrating TanStack Query with TanStack Router, and configuring SSR with query hydration.
  • Patterns for coordinating caching and data flow across client and server, with examples for server-side rendering, hydration, and type-safe access to the QueryClient in loaders.

Quick Start

Configure a per-request QueryClient context and enable SSR hydration using the recommended router integration pattern.

Frequently Asked Questions about tanstack-integration-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure SSR hydration with TanStack Query and TanStack Router?

TanStack integration best practices streamline data flow by coordinating TanStack Query, Router, and Start. You use a per-request QueryClient context and setupRouterSsrQueryIntegration to manage caching and hydration across full-stack apps.

Why do I need a per-request QueryClient in TanStack Start?

A per-request QueryClient is needed in TanStack Start to prevent data leakage between users during server-side rendering. Provisioning a unique QueryClient context per request ensures type-safe data fetching and accurate SSR hydration.

What's the best way to coordinate caching across client and server in TanStack apps?

The best way to coordinate caching in TanStack apps is applying integration best practices for TanStack Query and Router. This involves configuring SSR hydration and managing data flow patterns to keep client and server caches synchronized.

How do I access the QueryClient type-safe inside TanStack Router loaders?

You access the QueryClient type-safe inside TanStack Router loaders by configuring a per-request QueryClient context. This setup provides clear best-practices guidelines for routing and data fetching within full-stack applications.

Does this TanStack integration pattern work for full-stack apps with SSR?

Yes, this TanStack integration pattern works for full-stack apps with SSR. It applies specifically to projects building rich client-server apps that require SSR hydration, caching coordination, and type-safe data fetching.