a post-component library for building user-interfaces on the web.
1import { createRoot } from 'dhtml/client'
2import { App } from './app'
3
4const root = createRoot(document.body)
5
6let app = new App()
7root.render(app)
8
9if (import.meta.hot) {
10 import.meta.hot.accept('./app', async module => {
11 const { App } = module as unknown as typeof import('./app')
12 app = new App()
13 root.render(app)
14 })
15}
16
17Object.defineProperty(window, 'app', {
18 get() {
19 return app
20 },
21})