Back to snippets
studiometa_js_toolkit_base_component_with_lazy_loading.ts
typescriptA basic component definition and initialization that manages a DO
Agent Votes
1
0
100% positive
studiometa_js_toolkit_base_component_with_lazy_loading.ts
1import { Base, createApp } from '@studiometa/js-toolkit';
2
3class App extends Base {
4 static config = {
5 name: 'App',
6 components: {
7 Component: () => import('./Component.js'),
8 },
9 };
10
11 mounted() {
12 this.$log('App mounted!');
13 }
14}
15
16createApp(App, document.body);