Packages@robojs/sync
ZoneContextValue<ClientData>
Interface: ZoneContextValue<ClientData>
Context value provided by SyncZone to its children.
Type Parameters
| Type Parameter | Default type |
|---|---|
ClientData | unknown |
Properties
| Property | Type | Description |
|---|---|---|
broadcast | (payload: unknown) => void | Send ephemeral message to all clients in zone |
clients | Client<ClientData>[] | Clients subscribed to this zone |
connectionStatus | ConnectionStatus | Connection status |
hostId | string | The host client ID for this zone |
isHost | boolean | Whether current client is host of this zone |
prefix | (null | string)[] | Accumulated key prefix from nested zones |
send | (clientId: string, payload: unknown) => void | Send ephemeral message to specific client |
