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

0.0.9 • Public • Published

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;

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.91latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.91
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20

Package Sidebar

Install

npm i @washi/react-router

Weekly Downloads

1

Version

0.0.9

License

MIT

Unpacked Size

8.68 kB

Total Files

6

Last publish

Collaborators

  • shibanet0