sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Type alias UseSyncedStateOptions Beta<T>

UseSyncedStateOptions: <T> object

Options for useSyncedState.

Type parameters

Parameter
T

Type declaration

onLocalStateChange

onLocalStateChange?: (state) => void

A callback function that is triggered when the state is updated via the local setter, but not through synchronization with syncValue.

Parameters

ParameterType
stateT

Returns

void


syncCompareFn

syncCompareFn?: (currentState, syncValue) => boolean

A custom comparison function to determine if the external syncValue is different from the current state. The default function performs a deep equality check using isEqual.

Parameters

ParameterType
currentStateT
syncValueT

Returns

boolean

Last Updated: