lustre/effect
To read the full documentation for this module, please visit https://lustre.build/api/lustre/effect
Types
Functions
pub fn event(name: String, data: a) -> Effect(b)
Emit a custom event from a component as an effect. Parents can listen to these
events in their view
function like any other HTML event.
You probably don’t need to use this type of effect if you’re not making use of Lustre’s components, but in rare cases it may be useful to emit custom events from the DOM node that your Lustre application is mounted to.