@empathyco/x-components
Version:
Empathy X Components
73 lines (34 loc) • 1.14 kB
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
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
action
</td><td>
string
</td><td>
The full action path to dispatch. I.e. `x/querySuggestions/fetchSuggestions`<!-- -->.
</td></tr>
<tr><td>
staticPayload
</td><td>
any
</td><td>
A static payload to pass to the action which will be dispatched.
</td></tr>
</tbody></table>
**Returns:**
[AnyWire](./x-components.anywire.md)
[AnyWire](./x-components.anywire.md) A wire that dispatches the action with the staticPayload payload.