Skip to main content

Type-Safe Routing for Modern Web Apps

TanStack Router delivers end-to-end type safety, built-in caching, and powerful data loading capabilities for React, Solid, and Vue applications.

Why TanStack Router?

Build applications with confidence using a router designed for the modern web

Type-Safe Routes

Full TypeScript inference for routes, params, search params, and loaders

Built-in Caching

Automatic caching and revalidation of route data with fine-grained control

Smart Prefetching

Intelligent prefetching strategies for instant navigation experiences

Search Params

First-class support for type-safe, validated search parameters

Nested Routes

Powerful nested routing with layouts, error boundaries, and transitions

Full-Stack Ready

Scale to full-stack with TanStack Start for SSR, streaming, and server functions

Quick Start

Get up and running with TanStack Router in minutes

1

Install the package

Install TanStack Router using your preferred package manager:
2

Create your routes

Define your application routes using file-based or code-based routing:
3

Set up the router

Create and configure your router instance:
4

Start navigating

Use the Link component for type-safe navigation:

Ready to build with TanStack Router?

Start building type-safe, performant routing for your React, Solid, or Vue application today