@progress/sitefinity-nextjs-sdk
Version:
Provides OOB widgets developed using the Next.js framework, which includes an abstraction layer for Sitefinity communication. Additionally, it offers an expanded API, typings, and tools for further development and integration.
17 lines (16 loc) • 652 B
TypeScript
import { WidgetModel } from '../editor/widget-framework/widget-model';
export declare const EVENTS: {
PERSONALIZED_WIDGETS_LOADED: string;
};
export interface PersonalizedWidgetsPayload {
[key: string]: {
ssr: boolean;
data: WidgetModel | string;
};
}
/**
* Returns a stateful event payload value and a function to dispatch an event with data.
* @param eventKey The custom event key to be dispatched and listened to.
* @param attach Whether to create an event listener in the current hook instance or skip it.
*/
export declare function useSfEvents<T>(eventKey: string, attach?: boolean): [T | null, (data: T) => void];