@empathyco/x-components
Version:
Empathy X Components
57 lines (27 loc) • 1.01 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_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
<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>
</tbody></table>
**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.