JoyDomComponentsBuilder

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Link copied to clipboard
fun component(type: String, component: JoyDomComponent)

Register component for node type. Registering a built-in type (div, span, p, h1h6, img) overrides its built-in renderer.

Link copied to clipboard
fun default(component: JoyDomComponent)

Register a placeholder rendered for any custom type that has no registered component. Without a default, an unregistered custom type renders nothing — the node and its whole subtree are hidden. The placeholder gets the normal ComponentScope, so default { Children() } reproduces rendering the node's children, while default { /* stub using node.type*/ } shows a fixed placeholder. Applies only to unregistered, non-built-in types — built-ins keep their own renderer.