@empathyco/x-components
Version:
Empathy X Components
28 lines (16 loc) • 953 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [wireDispatch](./x-components.wiredispatch_1.md)
## wireDispatch() function
Creates a wire that dispatches an action to the store. This wire can be used in every event, as it does not have a payload type associated.
**Signature:**
```typescript
export declare function wireDispatch(action: string, staticPayload: any): AnyWire;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| action | string | The full action path to dispatch. I.e. <code>x/querySuggestions/fetchSuggestions</code>. |
| staticPayload | any | A static payload to pass to the action which will be dispatched. |
**Returns:**
[AnyWire](./x-components.anywire.md)
[AnyWire](./x-components.anywire.md) A wire that dispatches the action with the staticPayload payload.