Skip to content

Function: createPlayUI()

API / @xmachines/play-dom / createPlayUI

function createPlayUI(registryResult, options?): MountFn;

Defined in: packages/play-dom/src/create-play-ui.ts:95

Creates the mount function of the complete DOM renderer.

The caller makes registryResult with defineRegistry. createPlayUI holds it, and it returns a MountFn. Call that function one time for each pair of an actor and a container.

Parameters

ParameterTypeDescription
registryResultDefineRegistryResultThe result of defineRegistry(). It gives the registry and the factory of the handlers, which it builds late.
optionsCreatePlayUIOptionsThe factory configuration. See CreatePlayUIOptions: - functions — the named compute functions of a $computed prop expression. - directives — your own dynamic values with a $ prefix. The renderer resolves them with the props. - validationFunctions — your own check functions. They are available at ctx.ctx.validationFunctions. - navigate — the navigation callback. The renderer calls it for onSuccess: { navigate: "..." }. - onRenderError — the (error, name) handler of a component render error and of an action handler rejection. - fallback — the element to show when the first view of the actor is null.

Returns

MountFn

The MountFn: (actor, container, mountOptions?) → disconnect