TanStack Router

TanStack Router

Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering.
GitHub
5.32k
Created 5 years ago, last commit a day ago
133 contributors
1.58k commits
Stars added on GitHub, month by month
11
12
1
2
3
4
5
6
7
8
9
10
2022
2023
Stars added on GitHub, per day, on average
Yesterday
+1
Last week
+1.7 /day
Last month
+3.2 /day
Last 12 months
+4.1 /day
Package on NPM
Monthly downloads on NPM
11
12
1
2
3
4
5
6
7
8
9
10
2022
2023
README

TanStack Router Header

🤖 Type-safe router w/ built-in caching & URL state management for React, Preact, and friends

#TanStack semantic-release Join the discussion on Github Best of JS

Enjoy this library? Try the entire TanStack! React Query, React Table, React Charts, React Virtual

Visit tanstack.com/router for docs, guides, API and more!

Quick Features

  • 100% TypeSafe
    • Route Defs
    • Navigation
    • Relative Navigation
    • Search Params
    • Path Params
    • Loaders
    • Actions
  • 1st Class Search Params
    • Schemas + Validation
    • Parsing + Serialization
    • Immutable
    • Structural Sharing
    • Pre/Post Processing
  • Built-in Caching
    • Stale-While-Revalidate
    • Max-Age
    • Auto Garbage Collection
    • Invalidation
  • Prefetching
  • Automatic Prefetching
  • Transitions
  • Error Boundaries
  • Code Splitting
  • Layout Routes
  • Easy Integration w/ external caches and storage (eg. React Query, Apollo, SWR, RTKQuery)