Table of Contents

Method Mount

Namespace
Velvet
Assembly
Velvet.Docs.dll

Mount(VisualElement, VNode)

Mounts a VNode tree onto target, establishing it as a render root and performing the initial render. Dispose the returned MountedTree to unmount.

public static MountedTree Mount(VisualElement target, VNode tree)

Parameters

target VisualElement

The VisualElement to mount onto.

tree VNode

The VNode tree to mount (V.Provider, V.Component, V.Div, etc.). Treated as immutable after V.Mount: to change content, Dispose and re-Mount, or express dynamic parts using hooks (UseState / UseStore / UseContext) inside child components.

Returns

MountedTree

A handle for Unmount (dispose to tear down).