@empathyco/x-components
Version:
Empathy X Components
57 lines (27 loc) • 995 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
<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)<!-- --><Payload>
[Wire](./x-components.wire.md) A wire that commits the mutation with the payload that it receives in the observable.