createElement
@akhaled01/void • Docs
@akhaled01/void / DOM/createElement / createElement
Function: createElement()
createElement<
P
>(tag
,props
, ...children
):ElementVNode
Creates a virtual DOM element.
Type Parameters
• P = object
Parameters
• tag: string
The HTML tag name.
• props: P
= ...
The properties/attributes of the element.
• ...children: (string
| VNode
)[]
The child elements or text nodes.
Returns
A VNode representing the element.