Browse documentation

Vnode

Represents a virtual node with its tag, properties, children and lifecycle state.

Table of contents

Category

Value

Import

js
import { Vnode } from "valyrian.js";

Public signature

ts
new Vnode(tag: VnodeTag, props: Properties | null, children: Children, key?: string | number, dom?: DomElement, isSVG?: boolean, oldChildComponents?: Set<ValyrianComponent>, childComponents?: Set<ValyrianComponent>, hasKeys?: boolean, oncreate?: Set<Function>, oncleanup?: Set<Function>, onupdate?: Set<Function>, onremove?: Set<Function>): Vnode

API form

Vnode is a class. Most application code creates its instances through v(...) or the automatic TSX runtime, while new Vnode(...) remains the direct public constructor.

Essential properties

ts
tag: VnodeTag
props: Properties | null
children: Children
key?: string | number
dom?: DomElement