Home / Function/ createComponent() — astro Function Reference

createComponent() — astro Function Reference

Architecture documentation for the createComponent() function in astro-component.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  517c2959_8e1b_8d84_bb92_d35cd47e42be["createComponent()"]
  210ae47f_0b36_a098_f009_b4233604e5ef["astro-component.ts"]
  517c2959_8e1b_8d84_bb92_d35cd47e42be -->|defined in| 210ae47f_0b36_a098_f009_b4233604e5ef
  f68031e7_7604_0f11_a1b1_5548d3137d57["baseCreateComponent()"]
  517c2959_8e1b_8d84_bb92_d35cd47e42be -->|calls| f68031e7_7604_0f11_a1b1_5548d3137d57
  1a85e680_9a75_a4a9_46ee_2d80fa739b71["createComponentWithOptions()"]
  517c2959_8e1b_8d84_bb92_d35cd47e42be -->|calls| 1a85e680_9a75_a4a9_46ee_2d80fa739b71
  style 517c2959_8e1b_8d84_bb92_d35cd47e42be fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/server/astro-component.ts lines 44–54

export function createComponent(
	arg1: AstroComponentFactory | CreateComponentOptions,
	moduleId?: string,
	propagation?: PropagationHint,
) {
	if (typeof arg1 === 'function') {
		return baseCreateComponent(arg1, moduleId, propagation);
	} else {
		return createComponentWithOptions(arg1);
	}
}

Domain

Subdomains

Frequently Asked Questions

What does createComponent() do?
createComponent() is a function in the astro codebase, defined in packages/astro/src/runtime/server/astro-component.ts.
Where is createComponent() defined?
createComponent() is defined in packages/astro/src/runtime/server/astro-component.ts at line 44.
What does createComponent() call?
createComponent() calls 2 function(s): baseCreateComponent, createComponentWithOptions.

Analyze Your Own Codebase

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

Try Supermodel Free