<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [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)<!-- -->&lt;Payload&gt;

[Wire](./x-components.wire.md) A wire that dispatches the action with the payload that it receives in the observable.

