bootstrap
function bootstrap<GConfig extends IComponentConfig>(
component: IComponent<GConfig>,
slots?: IVirtualCustomElementNodeSlotsMap,
container?: HTMLElement | IGenericVirtualRootNode,
): VirtualCustomElementNode<GConfig>
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>
).
Example
main.ts
import { bootstrap } from '@lirx/dom';
import { AppMain } from './main/main.component';
bootstrap(AppMain);