# molefrog/wouter

🥢 A minimalist-friendly ~2.2KB routing for React and Preact

Repository: https://github.com/molefrog/wouter
Canonical: https://ross.abutalabs.com/products/wouter
Homepage: https://npm.im/wouter
Language: TypeScript
License: Unlicense
License Family: permissive
Topics: react-hooks, router, microlibrary, zero-dependency, react, preact, typescript, react-router, hacktoberfest
Last push: 2026-08-21T16:12:40+00:00

## Health v2 (maintenance only)
Score: 82/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 50, longevity 100
- inputs: {"age_days": 2703, "days_push": 12, "days_rel": 258, "gap_med": 40, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7868, forks 189 (observed 2026-08-28T04:10:08.371978+00:00)

## What it is
Wouter is a tiny (~2KB) hook-based routing library for React and Preact applications. It provides familiar Route, Link, Switch, and Redirect components plus hooks like useLocation and useRoute, with no required top-level Router component.

## Use cases
- add client-side routing to a React SPA
- replace react-router with a much smaller bundle
- use routing in a Preact app
- do route matching with hooks for custom navigation or animations
- build a minimal single-page app without heavy dependencies

## When to choose
- bundle size matters and you only need basic routing
- you prefer a hooks-first API over component-heavy routers
- you use React or Preact and want zero-dependency routing

## When to avoid
- you need advanced features like nested layouts, data loaders, or route-based code splitting out of the box
- you need SSR framework-integrated routing like Next.js file-based routing
- your team already relies on React Router's ecosystem and patterns

## Facets
- artifact type: library
- maturity: active
- function: routing, web-framework
- domain: web-development, frontend
- platform: browser
- tags: react, preact, hooks, microlibrary, zero-dependency, typescript, spa-routing, nodejs, web-server

## Member repositories
- molefrog/wouter (main) score 82

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:08.371978+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:33:45.275459+00:00, confidence not recorded.
  - readme: https://github.com/molefrog/wouter (fetched 2026-08-28T04:10:08.371978+00:00, sha 8fe15fdf746a)
  - registry_npm: https://registry.npmjs.org/wouter (fetched 2026-08-29T08:30:31.111369+00:00, sha c5972f1d5af0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
