@kurrent-ui/router
Stencil router using only Functional Components.
Install
Add to your project
yarn add @kurrent-ui/router
Also, include the peer dependencies:
yarn add @kurrent-ui/utils
Usage within a stencil project
Initialize the router with your options, in the componentWillLoad
of the root component.
import { router } from '@kurrent-ui/router';
@Component({
tag: 'ui-root',
styleUrl: 'root.css',
})
export class Root {
componentWillLoad() {
router.init({
titleSuffix: ' - Kurrent',
});
}
}
Import the functional components directly, and use them within your components:
import { Link } from '@kurrent-ui/router';