Home / Function/ getChildren() — astro Function Reference

getChildren() — astro Function Reference

Architecture documentation for the getChildren() function in client.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  545760f8_74b4_0081_09e0_80ba161e78d4["getChildren()"]
  c5f3c713_1f42_3f72_0411_7043ce23ab8a["client.ts"]
  545760f8_74b4_0081_09e0_80ba161e78d4 -->|defined in| c5f3c713_1f42_3f72_0411_7043ce23ab8a
  20b1d023_a619_047c_cb8f_f30ee5fdc8a9["createReactElementFromDOMElement()"]
  545760f8_74b4_0081_09e0_80ba161e78d4 -->|calls| 20b1d023_a619_047c_cb8f_f30ee5fdc8a9
  style 545760f8_74b4_0081_09e0_80ba161e78d4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/integrations/react/src/client.ts lines 40–54

function getChildren(childString: string, experimentalReactChildren: boolean) {
	if (experimentalReactChildren && childString) {
		let children = [];
		let template = document.createElement('template');
		template.innerHTML = childString;
		for (let child of template.content.children) {
			children.push(createReactElementFromDOMElement(child));
		}
		return children;
	} else if (childString) {
		return createElement(StaticHtml, { value: childString });
	} else {
		return undefined;
	}
}

Domain

Subdomains

Frequently Asked Questions

What does getChildren() do?
getChildren() is a function in the astro codebase, defined in packages/integrations/react/src/client.ts.
Where is getChildren() defined?
getChildren() is defined in packages/integrations/react/src/client.ts at line 40.
What does getChildren() call?
getChildren() calls 1 function(s): createReactElementFromDOMElement.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free