Skip to content

Documentation / @ripl/vue / elementFactory

Function: elementFactory() ​

elementFactory<TOptions>(create): (options) => Element<Partial<BaseState>, ElementEventMap>

Defined in: adapters/vue/src/core/define-element.ts:95

Adapts a typed element factory to RiplNodeDefinition's untyped create hook.

Type Parameters ​

Type ParameterDescription
TOptionsThe factory's own options type.

Parameters ​

ParameterTypeDescription
create(options) => unknownThe element's factory function.

Returns ​

A create hook that constructs the element from a loose prop bag.

(options) => Element<Partial<BaseState>, ElementEventMap>