Home > @findkit/ui > FindkitUI > once

FindkitUI.once() method

Bind an event handler to the emitter

Signature:

once<EventName extends keyof E>(eventName: EventName, handler: (event: E[EventName] & {
        source: FindkitUI<G>;
    }) => void): () => void;

Parameters

Parameter Type Description
eventName EventName
handler (event: E[EventName] & { source: FindkitUI<G>; }) => void

Returns:

() => void

a function to unbind the handler