What problem does it solve?
Migrating a React application from React Router to TanStack Router involves many coordinated changes: build plugin configuration, file-based route restructuring, hook replacements, search param validation, and test setup. This Skill provides a structured, phase-by-phase migration process that prevents common mistakes like missing from parameters, broken type inference, and navigation loops.
Core Features & Use Cases
- Phased Migration Workflow: Seven phases covering assessment, build setup, router creation, route migration, hook migration, testing, and integrations (Sentry, nuqs).
- Type-Safe Patterns: Enforces
from parameters in hooks, Zod-validated search params via @tanstack/zod-adapter, and router type registration for full TypeScript inference.
- Incremental Migration Support: Reference guides for running React Router and TanStack Router side-by-side, including a RouterSync bridge component and embedded-mode shell synchronization.
- Use Case: A team maintaining a large React Router codebase wants type-safe routing. Use this Skill to audit existing routes, configure the Rspack/Vite plugin, convert routes to
src/routes/ file-based structure, and migrate hooks one component at a time without breaking the app.
Quick Start
Migrate my React app from React Router to TanStack Router using file-based routing, starting with an audit of existing routes and hooks.