@kojiro.ueda/zrouter
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

zrouter

Routing library for zheleznaya.

how to use

import { h, createStore } from "zheleznaya";
import { Router, Link } from "@kojiro.ueda/zrouter";

const App = () => {
  return (
    <div>
      <Link href="/about">about</Link>
      <Link href="/id1">id1 page</Link>
      <Link href="/id1">id2 page</Link>
      <Router routes={{
        "/": () => <div>top page</div>,
        "/about": () => <div>about</div>,
        "/:id": ({id}) => <div>{id}</div>,
      }}/>
    </div>
  );
}

/@kojiro.ueda/zrouter/

    Package Sidebar

    Install

    npm i @kojiro.ueda/zrouter

    Weekly Downloads

    2

    Version

    0.0.7

    License

    MIT

    Unpacked Size

    25.4 kB

    Total Files

    19

    Last publish

    Collaborators

    • kojiro.ueda