Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 472 Bytes

File metadata and controls

15 lines (11 loc) · 472 Bytes

useWidgetEvents

Subscribes to a list of events in a widget. The widget usually is stored in a state and initialized by setting the widgetRef on a component created using componentFromWidget.

In most situations using on<EventName> properties on widgets is a better alternative.

useWidgetEvents(widget, events);
  • widget: Widget - The widget instance.
  • events: Record<string,function> - The events and callbacks to subscribe to.