tanstack-router

Generate type-safe file-based routes for React applications.

5|3|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/mikkelkrogsholm/dev-skills --skill tanstack-router-mikkelkrogsholm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-router
Source: https://github.com/mikkelkrogsholm/dev-skills/tree/main/tanstack-router
Command: npx skills add https://github.com/mikkelkrogsholm/dev-skills --skill tanstack-router-mikkelkrogsholm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexity of managing navigation and data loading in React applications by providing a fully type-safe routing solution, ensuring consistency and reducing runtime errors.

Core Features & Use Cases

  • File-based Routing: Automatically generates routes based on file structure.
  • Type-Safe Links & Navigation: Ensures type safety for links, navigation functions, and search parameters.
  • Loaders & Caching: Manages data fetching and caching for routes.
  • Use Case: When building a complex dashboard with nested routes and dynamic data, use this Skill to define all routes, manage search params, and ensure type safety across the application.

Quick Start

Use the tanstack-router skill to generate the route tree for your React application.

Frequently Asked Questions about tanstack-router

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

FAQPage Schema
How do I set up type-safe routing in a React application?

Type-safe routing in React uses file-based routing and codegen to synchronize the route tree, ensuring links, navigation, and search parameters are fully validated against runtime errors.

What is the best way to manage search parameters and data fetching in React?

Managing search parameters and data fetching in React requires a router with explicit search parameter validation and built-in loaders, ensuring structured data loading and cached navigation.

How does file-based routing work for React navigation?

File-based routing automatically generates the route tree from your file structure, requiring codegen to maintain type safety for nested routes and dynamic data fetching in React projects.

Do I need explicit validation for search parameters in type-safe React routers?

Explicit validation for search parameters is required to maintain type safety, ensuring that navigation functions and data loaders handle search params consistently without runtime errors.

Can I use type-safe navigation for complex dashboards with nested routes?

Type-safe navigation supports complex dashboards with nested routes by defining all routes through a file structure, managing search params, and ensuring type safety across the application.

Why does codegen need to run for route tree synchronization in React?

Codegen must run for route tree synchronization to maintain type safety, linking the file-based routing structure to the TypeScript types used for navigation and search parameter validation.