post-me

Home > post-me > LocalHandle > emit

LocalHandle.emit() method

Emit a custom event with a payload. The event can be captured by the other context.

Signature:

emit<K extends keyof E>(eventName: K, data: E[K], options?: EmitOptions): void;

Parameters

Parameter Type Description
eventName K The name of the event
data E[K] The payload associated with the event
options EmitOptions The EmitOptions to customize this emit call

Returns:

void