useEvent
Dispatch events from the webcomponent without referencing the context(this)
Syntax
Where:
dispatchEvent: callback, dispatches the event from the webcomponent and allows defining the detail by receiving a first parameter
myEvent: string, name of the event to dispatch.
eventInit: optional object, event configuration.
Examples
Event customization
The second parameter of useEvent
allows customizing the behavior of the even:
Recommended articles
Last updated
Was this helpful?