ContentFetcher

Learn how to type the slot content fetcher.

This type represents a callback that fetches a slot’s content.

Signature

This type has the following definition:

type ContentFetcher = (id: string) => Promise<FetchResponse | undefined>;

The callback receives the slot ID and resolves to the slot’s content response. Resolving to undefined leaves the block’s own content in place, which is how the integration skips personalization in the Storyblok visual editor.