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
Best fit
Before adoption
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]TanStack/router README at 57e126e99dbd(2026-10-05)
- [2]Router official documentation(2026-10-05)
- [3]@tanstack/react-router 1.170.41 package source(2026-10-05)
- [4]TanStack/router LICENSE at 57e126e99dbd(2026-10-05)
- [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
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
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
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'
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
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Redux61,484 Stars
3 shared tag(s) · Same language
make shared-state updates explicit with stores/actions/reducers, while modern code uses Toolkit
TypeScript - Zustand58,786 Stars
3 shared tag(s) · Same language
manage React state with provider-free hook stores and subscribe through selectors
TypeScript - Expo52,566 Stars
3 shared tag(s) · Same language
build React Native apps for Android, iOS, and web from one project model
TypeScript - TanStack Query50,394 Stars
3 shared tag(s) · Same language
Manage fetching, caching, refetching, and mutations for remote server state outside local UI-state code
TypeScript - Virtual7,128 Stars
3 shared tag(s) · Same language
A headless virtualizer that calculates only the items near the viewport to reduce rendering work for long lists
TypeScript - Markuplint623 Stars
3 shared tag(s) · Same language
lint markup against HTML and ARIA rules across HTML, React, Vue, Svelte, and other templates
TypeScript
Report incorrect information
Tell us if any listing information is incorrect or outdated.