LogoRobo.js
Packages@robojs/sync

SyncBoxProps<T, ClientData>

Interface: SyncBoxProps<T, ClientData>

Props for SyncBox component.

Type Parameters

Type ParameterDefault type
Tunknown
ClientDataunknown

Properties

PropertyTypeDescription
as?null | keyof IntrinsicElements | ComponentType<unknown>Element type to render (default: 'div', null for no wrapper)
children?| ReactNode | SyncBoxRenderFunction<T, ClientData>Children to render - can be ReactNode or render function
className?stringCSS class name for wrapper element
id(null | string)[]Key suffix (combined with zone prefix)
initialState?TInitial state value
interpolate?InterpolateConfig<T>Interpolation config for smooth remote updates (field -> lerp factor 0-1)
lockable?booleanEnable lockable mode for exclusive ownership
onConflict?(localState: T, remoteState: T) => TConflict resolution callback when remote update arrives during local changes
onStateChange?(state: T, prevState: undefined | T) => voidCallback when synced state changes
onSyncStatusChange?(status: SyncStatus) => voidCallback when sync status changes
style?CSSPropertiesCSS styles for wrapper element
throttle?ThrottleConfig<T>Throttle setState calls - number (ms) or per-field config

On this page