Command Palette

Search for a command to run...

TanStack Router logo
position in category
#14

Client-first, server-capable router for React and Solid with full type safety and first-class URL state management. Supports nested and layout routes, built-in data loaders with SWR-style caching, deferred loading, prefetching, and SSR. Designed to work with TanStack Query, SWR, Apollo, and custom data fetching.

TanStack Router is part of the TanStack ecosystem alongside Query, Table, and Form. It stands out from React Router and Remix by offering 100% inferred TypeScript support: routes, path params, search params, and navigation are fully typed with zero runtime cost. Partners include Cloudflare, Prisma, Clerk, Sentry, and Netlify. It powers TanStack Start, a full-stack framework with server functions.

Key capabilities:

  • Fully type-safe routing with inferred types for paths, params, search, and context
  • First-class search param APIs with JSON serialization, schemas, validation, and middleware
  • Built-in loaders with SWR-style caching, or integration with TanStack Query and other caches
  • File-based and code-based routing, including mixed usage and virtual routes
  • Automatic code splitting, prefetching, and document head management
  • SSR support with streaming, navigation blocking, and scroll restoration

Use cases include React and Solid SPAs, full-stack apps with TanStack Start, dashboards with complex URL state, and applications that benefit from type-safe routing and search params. Works with Vite, Webpack, Rspack, and esbuild. ESLint plugin and DevTools are available.

GitHub Repositories
199
-11.9%
Trending down this week
Removed in 27 repos