@empathyco/x-components
Version:
Empathy X Components
27 lines (15 loc) • 876 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_2.md)
## wireDispatch() function
Creates a wire that dispatches an action to the store. This wire will pass the payload received in the observable to the action.
**Signature:**
```typescript
export declare function wireDispatch<Payload>(action: string): Wire<Payload>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| action | string | The full action path to dispatch. I.e. <code>x/querySuggestions/fetchSuggestions</code>. |
**Returns:**
[Wire](./x-components.wire.md)<!-- --><Payload>
[Wire](./x-components.wire.md) A wire that dispatches the action with the payload that it receives in the observable.