Documentation / @ripl/vue / useElementProps
Function: useElementProps() ​
useElementProps<
TElement>(props,options):TElement|undefined
Defined in: adapters/vue/src/core/use-element-props.ts:54
Constructs an element from its bound props and keeps it in sync with them.
The construction snapshot excludes unbound props, so a prop the template never set cannot overwrite a Ripl default. Later changes arrive pre-split into animatable state and plain fields, since the two are written through different paths on the element.
Type Parameters ​
| Type Parameter | Description |
|---|---|
TElement extends Element<Partial<BaseState>, ElementEventMap> | The element type being wrapped. |
Parameters ​
| Parameter | Type | Description |
|---|---|---|
props | RiplWritable | The component's props object. |
options | RiplElementPropsOptions<TElement> | How to build the element and apply changes to it. |
Returns ​
TElement | undefined
The constructed element, or undefined when construction declined.