lit-ui-router / RoutedLitTemplate
Type Alias: RoutedLitTemplate
ts
type RoutedLitTemplate = (props?) => TemplateResult | (props) => TemplateResult;Defined in: packages/lit-ui-router/src/interface.ts:195
A function that returns a Lit TemplateResult for rendering in a <ui-view>.
This is one of the component types that can be used in state declarations. The function receives UIViewInjectedProps as its argument. NormalizedLitViewDeclaration.component uses this signature.
Example
ts
const HomeView: RoutedLitTemplate = (props) => {
return html`<h1>Welcome Home</h1>`;
};
router.stateRegistry.register({
name: 'home',
url: '/home',
component: HomeView,
});