0.0.9 • Published 2 years ago

@washi/react-router v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-router

Usage

import { Route, Router } from "@washi/react-router";

const auth = {
    login: new Route("/login"),
}

const user = {
    lk: new Route<"userId">("/lk/:userId"),
}

const routes = {
    ...auth,
    ...user,
}

const router = new Router(routes)

export const useNavigate = router.useNavigate;
export const Link = router.Link;
export const useParams = router.useParams;
0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago