Curi is a JavaScript router for single-page applications

Curi can provide routing for any JavaScript application, no matter how it is rendered. Curi provides packages to integrate the router with React DOM, React Native, Vue (in beta), and Svelte (in beta).

import { curi, prepareRoutes } from '@curi/router';
import Browser from '@hickory/browser';

const history = Browser();
const routes = prepareRoutes([
  { name: 'Home', path: '', ... },
  { name: 'User', path: 'u/:userID', ... },
  // more routes...
  { name: 'Not Found', path: '(.*)', ... }

const router = curi(history, routes);

Ready to learn?

The getting started guide will put you on the right path. If you prefer to learn through tutorials, there are React DOM and Vue tutorials to help guide you.


Want to see Curi in action? The examples section has a variety of demos showing off what you can do with Curi.