@empathyco/x-components
Version:
Empathy X Components
14 lines (8 loc) • 754 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) > [onCancel](./x-components.fetchandsavehooks.oncancel.md)
## FetchAndSaveHooks.onCancel property
Synchronous callback executed when the request is cancelled. This can happen mainly for two reasons: - The [FetchAndSaveActions.cancelPrevious](./x-components.fetchandsaveactions.cancelprevious.md) action is dispatched. - A new [FetchAndSaveActions.fetchAndSave](./x-components.fetchandsaveactions.fetchandsave.md) is dispatched before the previous one was resolved.
**Signature:**
```typescript
onCancel?: () => void;
```