FlickingReactiveAPIOptions
Options for Flicking reactive API that help optimize initial rendering in SSR scenarios
These options allow you to set initial state values before the Flicking instance is fully initialized,
preventing unnecessary re-renders when the actual Flicking state is applied.
Type: TSInterface
PROPERTY | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
defaultIndex | number | 0 | Initial panel index to start with. This sets the currentPanelIndex and indexProgress initial values. Also affects isReachStart and isReachEnd initial value setting. |
totalPanelCount | number | 0 | Total number of panels in the Flicking instance. This sets the totalPanelCount initial value and helps prevent layout shifts during SSR hydration. |
const options = {
defaultIndex: 2,
totalPanelCount: 5
};
const reactiveObj = connectFlickingReactiveAPI(flicking, options);