Alokai

initLivePreview

Framework-agnostic initializer of storyblok Storyblok Bridge.

It simplifies the setup by providing a default configuration and calling the Live Preview SDK methods in the right manner.

Signature

export declare function initLivePreview(
	{ callback }: InitLivePreview
): void;

Parameters

NameRequiredTypeDescription
{ callback }RequiredInitLivePreview

Examples

import { sdk } from '~/sdk.config.ts';

sdk.storyblokLivePreview.utils.initLivePreview({
 callback: (updatedData) => {
   // Do something with the updated data...
 }
});

On this page