@empathyco/x-components
Version:
Empathy X Components
24 lines (14 loc) • 836 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [XActionContext](./x-components.xactioncontext.md) > [dispatch](./x-components.xactioncontext.dispatch_1.md)
## XActionContext.dispatch() method
**Signature:**
```typescript
dispatch<ActionName extends keyof Actions>(action: ActionName, payload: ExtractPayload<Actions[ActionName]>): ExtractActionReturn<Actions[ActionName]>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| action | ActionName | |
| payload | [ExtractPayload](./x-components.extractpayload.md)<!-- --><Actions\[ActionName\]> | |
**Returns:**
[ExtractActionReturn](./x-components.extractactionreturn.md)<!-- --><Actions\[ActionName\]>