I'm new to lit and JavaScript, but a few days ago, I was reading through the documentation and came across @lit-labs/router. The truth is, I wanted to try it to continue learning, but reading the little documentation that there is about @lit-labs/router I didn't understand how to implement it.
So my question is how do I implement routing with @lit-labs/router?
The link to @lit-labs/router:
@lit-labs/router
I can only make an example work
class MyElement extends LitElement {
private router = new Router(this, [
{path: '/', render: () => html`<h1>Home</h1>`},
]);
render() {
return this.router.outlet();
}
}