tanstack-router-migration
Installation
SKILL.md
React Router to TanStack Router Migration
Migrate React applications from React Router to TanStack Router with file-based routing. This skill provides a structured approach for both incremental and clean migrations.
Critical Rules
ALWAYS:
- Use file-based routing with routes in
src/routes/directory - Use
fromparameter in all hooks for type safety (useParams({ from: '/path' })) - Validate search params with Zod schemas using
@tanstack/zod-adapter - Configure build tool plugin before creating routes
- Register router type for full TypeScript inference
- Use
fallback()wrapper for optional search params
NEVER: