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
| Name | Required | Type | Description |
|---|---|---|---|
{ callback } | Required | InitLivePreview |
Examples
import { sdk } from '~/sdk.config.ts';
sdk.storyblokLivePreview.utils.initLivePreview({
callback: (updatedData) => {
// Do something with the updated data...
}
});