Home > @findkit/ui > Emitter > on

Emitter.on() method

Bind an event handler to the emitter

Signature:

on<EventName extends keyof Events>(eventName: EventName, handler: (event: Events[EventName], context: Context) => void): () => void;

Parameters

Parameter Type Description
eventName EventName
handler (event: Events[EventName], context: Context) => void

Returns:

() => void

a function to unbind the handler