PACKAGE · ROUTING

@tanstack/react-router

Modern and scalable routing for React applications

WEEKLY DOWNLOADS 29.1M
STARS 15.4K
FORKS 1.9K
OPEN ISSUES 849
GZIP SIZE 36.3 kB
UNPACKED SIZE 1.1 MB
DEPENDENCIES 8
LAST UPDATED 8mo ago
DOWNLOAD TRENDS

@tanstack/react-router downloads · last 12 months

Download trends for @tanstack/react-router1 download series from Nov 2025 to Oct 2026. Use left and right arrow keys to inspect monthly values.026.5M52.9M79.4M105.8MNov 2025FebMayAugOct 2026
@tanstack/react-router
ABOUT @TANSTACK/REACT-ROUTER

TanStack React Router provides routing for React applications, connecting URL paths and search parameters to the screens and state an application presents. It addresses the work of defining routes and handling navigation while keeping URL-driven behavior within a structured routing system.

The package’s stated focus is modern, scalable routing, with topics including type safety, TypeScript, search parameters, server-side rendering, and state management. It is aimed at React developers who want routing to cover more than matching a path, particularly when route definitions and URL state are important parts of the application’s architecture.

A typical implementation organizes the application around route definitions and uses router APIs and React hooks to access navigation, route data, and URL state. Search parameters are a first-class concern in the package’s positioning, making it suitable for workflows where filters or other view state should be represented in the URL; consult the package’s version-specific documentation for exact API signatures and setup requirements.

TanStack React Router is specifically for React and is categorized as a routing tool, with related topics spanning full-stack development, RPC, server functions, and SSR. Those topics indicate relevant integration areas, but the supplied package details do not establish that every server-side or full-stack capability is included in this package or enabled without additional configuration.

The supplied metadata reports a gzip bundle size of 36.3 kB and an unpacked size of 1.1 MB, so evaluate the shipped bundle in the context of your build and dependency budget rather than treating unpacked size as client payload. Version 1.170.46 is listed under the MIT license, with 8.4M weekly downloads, 15.2K GitHub stars, 1.9K forks, and 786 open issues; these figures provide adoption and maintenance context, not a guarantee of suitability or support. The listed last-updated date is 2026-10-22.

WHEN TO USE
  • When React routes need to represent typed paths and route-specific application state, evaluate the package’s TypeScript-oriented routing patterns.
  • When filters or view state should be shareable through URLs, use its search-parameter routing capabilities rather than keeping all state only inside components.
  • When navigation and route state should be accessed from React components, structure the application around the router’s React APIs and hooks.
  • When planning server-rendered React routes, assess the package’s SSR-related capabilities and verify the required setup for your rendering workflow.
  • When route behavior is part of a full-stack application, investigate the package’s documented integration with server functions or RPC before adopting those patterns.
  • When comparing routing dependencies, include the reported 36.3 kB gzip bundle size in your build-budget review and measure the actual output of your application.
WHEN NOT TO USE
  • If the application does not use React, this React-specific router is not a fit; use routing support designed for the framework in use.
  • If URL search parameters do not need route-aware handling, a basic path-switching mechanism may involve less routing architecture.
  • If the project does not use TypeScript and does not need the package’s type-safety-oriented patterns, compare its setup and concepts with a more minimal React routing approach.
  • If server rendering, server functions, or RPC are required, but the version-specific documentation does not confirm the needed integration, choose a rendering or server workflow with documented support instead.
  • If a strict client bundle budget cannot accommodate the reported 36.3 kB gzip size, measure a minimal build and consider a lighter routing approach.
  • If the team cannot take on the configuration and learning involved in route definitions and router-specific APIs, use a simpler navigation structure until those capabilities are needed.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 3
@tanstack/react-router vs wouter ★ 7.9K · 2.7M/wk @tanstack/react-router vs react-router ★ 56.7K · 79.3M/wk @tanstack/react-router vs @remix-run/router ★ 56.7K · 24.3M/wk