Packages@robojs/sync
SyncBoxProps<T, ClientData>
Interface: SyncBoxProps<T, ClientData>
Props for SyncBox component.
Type Parameters
| Type Parameter | Default type |
|---|---|
T | unknown |
ClientData | unknown |
Properties
| Property | Type | Description |
|---|---|---|
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? | string | CSS class name for wrapper element |
id | (null | string)[] | Key suffix (combined with zone prefix) |
initialState? | T | Initial state value |
interpolate? | InterpolateConfig<T> | Interpolation config for smooth remote updates (field -> lerp factor 0-1) |
lockable? | boolean | Enable lockable mode for exclusive ownership |
onConflict? | (localState: T, remoteState: T) => T | Conflict resolution callback when remote update arrives during local changes |
onStateChange? | (state: T, prevState: undefined | T) => void | Callback when synced state changes |
onSyncStatusChange? | (status: SyncStatus) => void | Callback when sync status changes |
style? | CSSProperties | CSS styles for wrapper element |
throttle? | ThrottleConfig<T> | Throttle setState calls - number (ms) or per-field config |
