tanstack-router

Installation
Summary

Type-safe, file-based React routing with route loaders, TanStack Query integration, and 20 documented error preventions.

  • File-based routing with auto-generated types, typed params, and search param validation via Zod adapter
  • Route-level data loading with loaders, error boundaries, and beforeLoad hooks for authentication and redirects
  • Virtual file routes for programmatic route configuration when file-based conventions don't fit
  • Prevents critical issues including Vite plugin ordering, devtools resolution, SSR streaming crashes, Docker prerender hangs, and param parsing bugs after navigation
SKILL.md

TanStack Router

Type-safe, file-based routing for React SPAs with route-level data loading and TanStack Query integration


Quick Start

Last Updated: 2026-01-09 Version: @tanstack/react-router@1.146.2

npm install @tanstack/react-router @tanstack/router-devtools
npm install -D @tanstack/router-plugin
# Optional: Zod validation adapter
npm install @tanstack/zod-adapter zod

Vite Config (TanStackRouterVite MUST come before react()):

Related skills
Installs
546
GitHub Stars
776
First Seen
Jan 31, 2026