OSS TanbouSign in with GitHub

A type-safe React router that connects routes, search parameters, and navigation through one inferred type model

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
15,152
Primary language
TypeScript
License
MIT
Repository last updated
Oct 5, 2026
On this page

Overview

TanStack Router is a React router that connects URL routes, search parameters, data loading, and navigation through inferred types. It helps catch invalid destinations and search values during development while keeping screen state shareable in the URL.

Features and best fit

Hands-on tested within the scope below · Content checked:

Key features

What Router handles

It infers route and search types from a route tree, then carries them into links, navigation, and loaders. Search validators can transform URL strings into application values such as page numbers.

Sources: [1][2][3]

Best fit

Where it fits

It fits React applications such as catalogs and dashboards that keep filters in the URL and need TypeScript to check destinations and search values. The pinned example reads page=2 and builds the next location with page=3.

Sources: [2][3]

Before adoption

What to verify before adoption

This is a React library, not a finished application with authentication or UI components. It requires Node.js 20.19 or later. GitHub reports MIT, and the fixed commit contains the MIT license text.

Sources: [3][4][5]

1.170.41 / macOS, Node.js 26.7.0, isolated temporary npm project

Executed the pinned @tanstack/react-router API example and verified /products page=2 followed by /products page=3; no browser or external service was used.

Official sources

  1. [1]TanStack/router README at 57e126e99dbd(2026-10-05)
  2. [2]Router official documentation(2026-10-05)
  3. [3]@tanstack/react-router 1.170.41 package source(2026-10-05)
  4. [4]TanStack/router LICENSE at 57e126e99dbd(2026-10-05)
  5. [5]TanStack/router GitHub metadata(2026-10-05)
Supplemental curator note

A strong option for React applications that share state in the URL and want route changes checked by types. Start by verifying search conversion and next-location construction with the pinned version and memory history.

Try it in 3 steps

  1. 1

    Prepare the pinned packages

    Requires Node.js 20.19 or later and npm. Create a temporary project pinned to React Router 1.170.41.

    demo=$(mktemp -d "${TMPDIR:-/tmp}/tanstack-router.XXXXXX") && cd "$demo" && npm init -y >/dev/null && npm install --save-exact @tanstack/react-router@1.170.41 react@19.2.0 react-dom@19.2.0
  2. 2

    Define a typed route and search value

    Create a /products route tree that converts the page search value to a number, starting memory history at page=2.

    printf '%s\n' 'import { createRootRoute, createRoute, createRouter } from '\''@tanstack/react-router'\''' 'import { createMemoryHistory } from '\''@tanstack/history'\''' 'const root=createRootRoute()' 'const products=createRoute({getParentRoute:()=>root,path:'\''/products'\'',validateSearch:s=>({page:Number(s.page??1)})})' 'const router=createRouter({routeTree:root.addChildren([products]),history:createMemoryHistory({initialEntries:['\''/products?page=2'\'']})})' 'await router.load()' 'console.log(`${router.state.location.pathname} page=${router.state.location.search.page}`)' 'const next=router.buildLocation({to:'\''/products'\'',search:{page:3}})' 'console.log(`${next.pathname} page=${next.search.page}`)' > demo.mjs
  3. 3

    Verify the current and next locations

    Require the current page=2 location followed by the page=3 location built for typed navigation.

    test "$(node demo.mjs)" = $'/products page=2\n/products page=3'
Check the official README

Growth

Growth trends · Last 30 days

15,152 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
127
Open PRs
406

Development activity is still being collected.

Built with

Categories and tags

Categories

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • react
  • router
  • routing
  • javascript
  • searchparams
  • search
  • url
  • route
  • typesafe
  • typescript
  • state-management
  • fullstack
Stars
15,152
Forks
1,881
Watchers
45
Open issues
317
Contributors
463
Owner type
Organization
Primary language
TypeScript
License
MIT
Repository last updated
Oct 5, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?