tanstack-router

Solid

Type-safe routing for React and Solid applications with first-class search params, data loading, and seamless integration with the React ecosystem.

Web & Frontend 15 stars 2 forks Updated yesterday Apache-2.0

Install

View on GitHub

Quality Score: 80/100

Stars 20%
40
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

## Overview TanStack Router is a fully type-safe router for React (and Solid) applications. It provides file-based routing, first-class search parameter management, built-in data loading, code splitting, and deep TypeScript integration. It serves as the routing foundation for TanStack Start (the full-stack framework). **Package:** `@tanstack/react-router` **CLI:** `@tanstack/router-cli` or `@tanstack/router-plugin` (Vite/Rspack/Webpack) **Devtools:** `@tanstack/react-router-devtools` ## Installation ```bash npm install @tanstack/react-router # For file-based routing with Vite: npm install -D @tanstack/router-plugin # Or standalone CLI: npm install -D @tanstack/router-cli ``` ## Core Concepts ### Route Trees Routes are organized in a tree structure. The root route is the top-level layout, and child routes nest underneath. ```tsx import { createRootRoute, createRoute, createRouter } from '@tanstack/react-router' const rootRoute = createRootRoute({ component: RootLayout, }) const indexRoute = createRoute({ getParentRoute: () => rootRoute, path: '/', component: HomePage, }) const aboutRoute = createRoute({ getParentRoute: () => rootRoute, path: '/about', component: AboutPage, }) const routeTree = rootRoute.addChildren([indexRoute, aboutRoute]) const router = createRouter({ routeTree }) ``` ### File-Based Routing File-based routing automatically generates the route tree from your file structure. Configure with Vite plugin: ```ts // vite.config.ts impor...

Details

Author
louisbrulenaudet
Repository
louisbrulenaudet/monorepo-template
Created
3 months ago
Last Updated
yesterday
Language
TypeScript
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category