path-router-web
v2.0.1
Published
A simple light-weight router
Downloads
164
Readme
Path Router
Install
yarn add path-router-web
// or
npm install path-router-web
Usage
import { setHistoryOptions } from "path-router-web";
setHistoryOptions({
baseUrl: "https://test.com/",
});
addRouter([{
path: "something/:key1/:key2",
resolves: [() => "resolve value"],
loadingCallback: () => {
console.log("Loading started");
},
callback: (firstResolve: string) => {
console.log("Page loaded", firstResolve);
},
}]);
Docs
https://codetraceio.github.io/path-router/
Contribute
Install dependencies
yarn install
Lint
yarn lint
Test
yarn test