getOrCreateRoot() — astro Function Reference
Architecture documentation for the getOrCreateRoot() function in client.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 0178d068_0aba_dea8_2898_70ab23543bfd["getOrCreateRoot()"] c5f3c713_1f42_3f72_0411_7043ce23ab8a["client.ts"] 0178d068_0aba_dea8_2898_70ab23543bfd -->|defined in| c5f3c713_1f42_3f72_0411_7043ce23ab8a style 0178d068_0aba_dea8_2898_70ab23543bfd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/react/src/client.ts lines 58–65
const getOrCreateRoot = (element: HTMLElement, creator: () => Root) => {
let root = rootMap.get(element);
if (!root) {
root = creator();
rootMap.set(element, root);
}
return root;
};
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does getOrCreateRoot() do?
getOrCreateRoot() is a function in the astro codebase, defined in packages/integrations/react/src/client.ts.
Where is getOrCreateRoot() defined?
getOrCreateRoot() is defined in packages/integrations/react/src/client.ts at line 58.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free