Bootstrap

API widget

useWidgetWithConfig

function

useWidgetWithConfig<W>(factory, props, propsConfig?): WidgetSlotContext<W>

Create and attach an agnos-ui/core widget to the current react component.

Type Parameters
W

W extends Widget<object, object, object, object>

The type of the widget.

Parameters
factory

WidgetFactory<W>

the widget factory

props

Partial<WidgetProps<W>> = {}

the props

propsConfig?

PropsConfig<WidgetProps<W>>

the props config

Returns

WidgetSlotContext<W>

the state, api and directives to track and interact with the widget