Favicon of Wouter

Wouter

A minimalist 2.2KB routing library for React and Preact that leverages hooks for a lightweight, intuitive developer experience.

Screenshot of Wouter website

This library provides a minimalist routing solution for modern React and Preact applications, weighing in at only ~2.2KB gzipped. By embracing a hook-based architecture, it eliminates the need for heavy top-level providers, allowing for a cleaner and more flexible codebase. It is designed to be a lightweight alternative to larger routing libraries while maintaining a familiar API.

Key benefits include:

  • Extremely small footprint: Significantly smaller than alternatives, helping to keep your application bundle size low.
  • Hook-first design: Offers granular control over routing logic, including location tracking and parameter matching, through intuitive hooks like useRoute, useLocation, and useParams.
  • Flexible API: Supports both component-based routing (using Route, Switch, and Link) and direct hook usage for custom implementations.
  • Native-like feel: Mimics industry best practices, making it easy for developers to migrate from other routing libraries without a steep learning curve.

Whether you are building a small project or a complex application, this router provides the essential tools for navigation without the overhead. It supports advanced features like nested routing, server-side rendering (SSR), and custom location hooks, ensuring it can scale with your project's requirements.

Categories:
Downloads
994,581
Stars
7,766
Last published
Dec 18, 2025
Last commit
3 months ago
License
Unlicense

Similar to Wouter

Favicon

 

  
  
Favicon

 

  
  
Favicon