use-universal-router
v1.0.0
Published
Univeral router for both client-side and server-side
Downloads
1
Readme
Universal router
Simple but highly functioning router for client side and server side.
Usage
const router = useUniversalRouter('/containers/3/hello', [
['/pages/:page', 'page-detail'],
['/containers/:number/:id', 'container-detail'],
['/', 'home'],
['/about', 'about'],
]);
// { match: 'container-detail', arguments: ['containers', '3', 'hello'] };
Happy hacking!