Home / Function/ createVNode() — astro Function Reference

createVNode() — astro Function Reference

Architecture documentation for the createVNode() function in index.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  d280536a_8bca_f19e_ba08_4f989734bd0a["createVNode()"]
  c98dc478_4d28_8749_a81d_0a986fd20476["index.ts"]
  d280536a_8bca_f19e_ba08_4f989734bd0a -->|defined in| c98dc478_4d28_8749_a81d_0a986fd20476
  6728f402_33ab_6274_5484_93c0b81615ff["transformSetDirectives()"]
  d280536a_8bca_f19e_ba08_4f989734bd0a -->|calls| 6728f402_33ab_6274_5484_93c0b81615ff
  80cb73a4_c5ac_f7a2_4d4a_683bd5b44c99["transformSlots()"]
  d280536a_8bca_f19e_ba08_4f989734bd0a -->|calls| 80cb73a4_c5ac_f7a2_4d4a_683bd5b44c99
  style d280536a_8bca_f19e_ba08_4f989734bd0a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/jsx-runtime/index.ts lines 75–92

function createVNode(
	type: any,
	props: Record<string, any> = {},
	key?: string | number,
): AstroVNode {
	if (key) {
		props.key = key;
	}
	const vnode: AstroVNode = {
		[Renderer]: 'astro:jsx',
		[AstroJSX]: true,
		type,
		props,
	};
	transformSetDirectives(vnode);
	transformSlots(vnode);
	return vnode;
}

Domain

Subdomains

Frequently Asked Questions

What does createVNode() do?
createVNode() is a function in the astro codebase, defined in packages/astro/src/jsx-runtime/index.ts.
Where is createVNode() defined?
createVNode() is defined in packages/astro/src/jsx-runtime/index.ts at line 75.
What does createVNode() call?
createVNode() calls 2 function(s): transformSetDirectives, transformSlots.

Analyze Your Own Codebase

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

Try Supermodel Free