RO

Router Utils

@tanstack/router-utils

Modern and scalable routing for React applications

Routing
react
location
router
routing
async
async router
typescript
@tanstack/router-utils
javascript
npm
Stars
1.1k
Weekly
16M
Open issues
13
Bundle
~15 kB

Installation

npm install @tanstack/router-utils

Code example

import { BrowserRouter, Routes, Route, Link } from "@tanstack/router-utils";

export function Example() {
  return (
    <BrowserRouter>
      <nav>
        <Link to="/">Home</Link>
      </nav>
      <Routes>
        <Route path="/" element={<h1>Home</h1>} />
      </Routes>
    </BrowserRouter>
  );
}

Pros & cons

Pros

  • Actively maintained by Tanner Linsley
  • 16M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~15 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 13 open issues on GitHub

FAQs

Alternatives & similar libraries