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