@empathyco/x-components
Version:
Empathy X Components
26 lines (15 loc) • 910 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [FetchAndSaveHooks](./x-components.fetchandsavehooks.md) > [onSuccess](./x-components.fetchandsavehooks.onsuccess.md)
## FetchAndSaveHooks.onSuccess() method
Asynchronous callback executed when the [FetchAndSaveHooks.fetch()](./x-components.fetchandsavehooks.fetch.md) is performed successfully.
**Signature:**
```typescript
onSuccess(context: Context, response: Response): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| context | Context | The [context](https://vuex.vuejs.org/guide/actions.html) of the actions, provided by Vuex. |
| response | Response | The data returned by [FetchAndSaveHooks.fetch()](./x-components.fetchandsavehooks.fetch.md)<!-- -->. |
**Returns:**
void