@empathyco/x-components
Version:
Empathy X Components
27 lines (15 loc) • 863 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [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
| Parameter | Type | Description |
| --- | --- | --- |
| mutation | string | The full mutation path to commit. I.e. <code>x/searchBox/setQuery</code>. |
**Returns:**
[Wire](./x-components.wire.md)<!-- --><Payload>
[Wire](./x-components.wire.md) A wire that commits the mutation with the payload that it receives in the observable.