Alokai

initLivePreview

Framework-agnostic initializer of Amplience Visualizations.

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

Signature

declare function initLivePreview(
	input: InitLivePreview
): void;

Parameters

NameRequiredTypeDescription
{ callback }Required
inputRequiredInitLivePreview

Examples

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

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

On this page