<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [fetchAndSaveRelatedPrompts](./x-components.fetchandsaverelatedprompts.md)

## fetchAndSaveRelatedPrompts() function

Default implementation for [RelatedPromptsActions.fetchAndSaveRelatedPrompts](./x-components.relatedpromptsactions.fetchandsaverelatedprompts.md) action.

**Signature:**

```typescript
fetchAndSaveRelatedPrompts: (context: RelatedPromptsActionContext, request: RelatedPromptsRequest | null) => void | Promise<void>
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  context | [RelatedPromptsActionContext](./x-components.relatedpromptsactioncontext.md) |  |
|  request | RelatedPromptsRequest \| null |  |

**Returns:**

void \| Promise&lt;void&gt;

