Atomico makes it easy to declare events at the type level using the Host type.
In the previous code, we have declared the onMyCustomEvent
event at the type level. According to the template logic, this event will be dispatched every time the button is clicked, and the detail attached to this event will be of type CustomDetail
.