UNPKG

@empathyco/x-components

Version:
27 lines (15 loc) 876 B
<!-- 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 | Parameter | Type | Description | | --- | --- | --- | | action | string | The full action path to dispatch. I.e. <code>x/querySuggestions/fetchSuggestions</code>. | **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.