Universal Router screenshot

Universal Router

Author Avatar Theme by Kriasoft
Updated: 12 Jan 2026
1764 Stars

A simple middleware-style router for isomorphic JavaScript web apps

Categories

Overview

Universal Router is a versatile, middleware-style routing library designed to simplify routing for both client-side and server-side applications. With its lightweight footprint and straightforward implementation, it brings flexibility and ease of use for developers working with various JavaScript frameworks such as React and Vue. Its clever use of the middleware approach, akin to Express and Koa, allows developers to quickly adapt to its functionalities while maintaining a scalable codebase.

The library is ideal for those looking to build applications with a clean and manageable routing system without the need for complicated dependencies. By focusing solely on routing, Universal Router ensures it delivers performance and simplicity, making it a go-to choice for many developers.

Features

  • Minimal Code Base: The library boasts a simple structure with a single path-to-regexp dependency, making it lightweight and easy to understand.
  • Framework Agnostic: Universal Router can be seamlessly integrated with multiple JavaScript frameworks including React, Vue, and Hyperapp, ensuring flexibility in project development.
  • Familiar Middleware Approach: Its design imitates the middleware methodologies used in popular frameworks like Express and Koa, allowing for a gentle learning curve for new users.
  • Support for Multiple Routing Styles: Developers can choose between imperative and declarative routing styles, tailoring the routing experience to their specific project needs.
  • Plain JavaScript Object Routes: Routes are represented as plain JavaScript objects, providing developers the freedom to manipulate and interact with them as desired.
  • Broad Browser Support: Universal Router supports all ES5-compliant browsers, including Internet Explorer 9 and above, ensuring accessibility across various platforms.
  • Community Driven: Contributions are welcome, fostering an active community where developers can engage in discussions, report issues, and work collaboratively on enhancements.