router README

The project's README from github.com/TanStack/router. As one markdown file: README.md.

TanStack Router

TanStack Router

A modern router designed for type safety, data‑driven navigation, and seamless developer experience.

  • End‑to-end type safety (routes, params, loaders)
  • Schema‑driven search params with validation
  • Built‑in caching, prefetching & invalidation
  • Nested layouts, transitions & error boundaries

Read the Router Docs →

TanStack Start

TanStack Start

A full‑stack framework built on Router, designed for server rendering, streaming, and production‑ready deployments.

  • Full‑document SSR & streaming
  • Server functions & end‑to‑end type safety
  • Deployment‑ready bundling & builds
  • All the power of TanStack Router, plus full‑stack features

Read the Start Docs →


npm downloads GitHub stars Bundle size

semantic-release Best of JS Follow @TanStack

Become a Sponsor!

Get Involved

Partners

CodeRabbit Cloudflare Netlify
Neon Clerk Convex
Sentry Prisma Strapi
Router & you?

We're looking for TanStack Router & Start Partners to join our mission! Partner with us to push the boundaries of TanStack Router & Start and build amazing things together.

LET'S CHAT

Explore the TanStack Ecosystem

… and more at TanStack.com »

router (TanStack/router)

caching
Searching Database…

15.2K ·GitHub
What is this?TanStack Router is a modern router for the web built around end-to-end type safety — routes, params, loaders and search params are all checked. The repo also hosts TanStack Start, a full-stack framework built on top of the router.
Is it a router library or a full framework?Both, in one repo: Router is the client-first routing library, while Start is an optional full-stack layer on top that adds full-document SSR, streaming, server functions and deployment-ready builds.
How do I get it into my project?Install the package for your framework (npm install @tanstack/react-router) and follow the quick start in the Router docs; Start has its own docs track. The repo itself is a pnpm + nx monorepo.
Does it only work with React?React is the lead target — the project is described as a router 'for the web (React and more)' — and the codebase is TypeScript throughout. Check the docs for the current list of supported frameworks.
Is it production-ready or still experimental?It is positioned for production rather than as an experiment: Start ships deployment-ready bundling and builds, and the repo's CI runs eslint, unit, e2e, type and build checks on every change.
Can I build a plain SPA with it, or is the server side mandatory?The router is client-first, so a classic single-page app is the base case — no server required. TanStack Start is opt-in: add it when you want full-document SSR, streaming and server functions on the same routing model.
Does it handle data fetching and caching itself?Yes — caching, prefetching and invalidation are built into the router, and loaders are typed parts of a route, so data-driven navigation works without bolting on an extra library.
How does it treat URL search params?They are schema-driven: you declare a validation schema per route and the params stay fully type-safe end to end, instead of being loose strings parsed off the URL.
Can I do nested layouts and per-route error handling?Yes — nested layouts, transitions and error boundaries are first-class routing features built into the router itself.
What are similar projects?nuxt, react-router, wasp, framework, reflex, fresh, graphql, open-saas
Creator
TanStack
Size
117.2 MB
Stars
15.2K
Age
7y
Commits · 90 Days