<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [wireCommit](./x-components.wirecommit_2.md)

## wireCommit() function

Creates a wire that commits a mutation to the store. This wire will commit to the store the payload that it receives in the observable.

**Signature:**

```typescript
export declare function wireCommit<Payload>(mutation: string): Wire<Payload>;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

mutation


</td><td>

string


</td><td>

The full mutation path to commit. I.e. `x/searchBox/setQuery`<!-- -->.


</td></tr>
</tbody></table>

**Returns:**

[Wire](./x-components.wire.md)<!-- -->&lt;Payload&gt;

[Wire](./x-components.wire.md) A wire that commits the mutation with the payload that it receives in the observable.

