MCPcopy Create free account
hub / github.com/bytebase/bytebase / mountReactApp

Function mountReactApp

frontend/src/react/app/mount.ts:17–29  ·  view source on GitHub ↗
(selector: string)

Source from the content-addressed store, hash-verified

15}
16
17export 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}

Callers

nothing calls this directly

Calls 4

loadCoreDepsFunction · 0.90
buildTreeFunction · 0.90
loadReactAppFunction · 0.85
renderMethod · 0.80

Tested by

no test coverage detected