TanStack Router & Query Integration
Integrates TanStack Router with TanStack Query to eliminate data waterfalls and optimize single-page application navigation performance.
This skill provides Claude with specialized patterns and best practices for combining TanStack Router and TanStack Query. It focuses on utilizing route loaders to prefetch data before components render, implementing the Query Options pattern for maximum type safety, and handling complex scenarios like parallel or dependent queries. By using these implementation patterns, developers can build React applications with instant perceived performance, robust error boundaries, and streamlined cache management.
Características Principales
01Parallel and dependent query fetching strategies within route loaders
02Route loader prefetching using ensureQueryData to eliminate waterfalls
03Intent-based preloading for instant navigation transitions on hover
04Standardized Query Options pattern for DRY and type-safe code
05Seamless integration with React Suspense and Router Error Boundaries
06177 GitHub stars
Casos de Uso
01Optimizing SPA performance by pre-fetching data during the routing phase
02Refactoring component-level data fetching to router-level loaders for better UX
03Implementing type-safe data fetching patterns in large-scale React projects