@empathyco/x-components
Version:
Empathy X Components
28 lines (16 loc) • 952 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[](./index.md) > [@empathyco/x-components](./x-components.md) > [wireCommit](./x-components.wirecommit_1.md)
Creates a wire that commits a mutation to the store. This wire can receive any value as payload. This wire can be used in every event, as it does not have a payload type associated.
**Signature:**
```typescript
export declare function wireCommit(mutation: string, staticPayload: any): AnyWire;
```
| Parameter | Type | Description |
| --- | --- | --- |
| mutation | string | The full mutation path to commit. I.e. <code>x/searchBox/setQuery</code>. |
| staticPayload | any | A static payload to pass to the mutation. |
**Returns:**
[](./x-components.anywire.md)
[](./x-components.anywire.md) A wire that commits the mutation with the staticPayload payload.