fix: top level await
This commit is contained in:
parent
5519769c73
commit
24278eb9b6
10
src/main.ts
10
src/main.ts
@ -15,7 +15,11 @@ const getRootElement = (id: string): HTMLElement => {
|
||||
return element
|
||||
}
|
||||
|
||||
const vdom = await init()
|
||||
const rootElement = getRootElement('root')
|
||||
const startApp = async () => {
|
||||
const vdom = await init()
|
||||
const rootElement = getRootElement('root')
|
||||
|
||||
ReactDOM.createRoot(rootElement).render(vdom)
|
||||
ReactDOM.createRoot(rootElement).render(vdom)
|
||||
}
|
||||
|
||||
startApp()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user