Skip to main content

bootstrap


function bootstrap<GConfig extends IComponentConfig>(
component: IComponent<GConfig>,
slots?: IVirtualCustomElementNodeSlotsMap,
container?: HTMLElement | IGenericVirtualRootNode,
): VirtualCustomElementNode<GConfig>

Definition

The bootstrap function is the entry point of the application. It creates a component, and appends it to the root of the dom tree (usually <body>).

info

The bootstrap should be called only once with the "main" component of your application.

Example

main.ts
import { bootstrap } from '@lirx/dom';
import { AppMain } from './main/main.component';

bootstrap(AppMain);