@mahaljs/router
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

npm version TEST

mahal-router

Official router plugin for Mahal framework

Install

npm i @mahaljs/router

Setup

import { Timer, Mahal } from "mahal";
import Root from "./components/root.mahal";
import { RouterPlugin, Router } from "@mahaljs/router";
import { routes } from "./routes";

const router = new Router(routes, {
    mode: "history"
});

const app = new Mahal(Root, '#app');
// add router as plugin
app.extend.plugin(RouterPlugin, router);

app.create();

Docs

https://mahaljs.com/docs/router/

Package Sidebar

Install

npm i @mahaljs/router

Weekly Downloads

7

Version

1.2.3

License

APACHE 2.0

Unpacked Size

409 kB

Total Files

50

Last publish

Collaborators

  • ujjwalguptaofficial