(selector: string)
| 15 | } |
| 16 | |
| 17 | export async function mountReactApp(selector: string) { |
| 18 | const container = document.querySelector(selector); |
| 19 | if (!container) { |
| 20 | throw new Error(`mountReactApp: missing container ${selector}`); |
| 21 | } |
| 22 | |
| 23 | const [deps, ReactApp] = await Promise.all([loadCoreDeps(), loadReactApp()]); |
| 24 | |
| 25 | const root = deps.createRoot(container); |
| 26 | root.render(buildTree(deps, ReactApp)); |
| 27 | |
| 28 | return root; |
| 29 | } |
nothing calls this directly
no test coverage detected