WO

Wouter

wouter

Minimalist-friendly ~1.5KB router for React

Routing
react
preact
router
tiny
routing
hooks
useLocation
wouter
javascript
npm
Stars
7.9k
Weekly
2.2M
Open issues
23
Bundle
~25 kB

Installation

npm install wouter

Code example

import { Route, Link } from "wouter";

export function Example() {
  return (
    <div>
      <Link href="/">Home</Link>
      <Route path="/">Home page</Route>
    </div>
  );
}

Pros & cons

Pros

  • Actively maintained by Alexey Taktarov
  • 2.2M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • Unlicense licensed

Considerations

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

FAQs

Alternatives & similar libraries