Home > post-me > LocalHandle > emit
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;
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