LogoRobo.js
Packages@robojs/sync

ZoneContextValue<ClientData>

Interface: ZoneContextValue<ClientData>

Context value provided by SyncZone to its children.

Type Parameters

Type ParameterDefault type
ClientDataunknown

Properties

PropertyTypeDescription
broadcast(payload: unknown) => voidSend ephemeral message to all clients in zone
clientsClient<ClientData>[]Clients subscribed to this zone
connectionStatusConnectionStatusConnection status
hostIdstringThe host client ID for this zone
isHostbooleanWhether current client is host of this zone
prefix(null | string)[]Accumulated key prefix from nested zones
send(clientId: string, payload: unknown) => voidSend ephemeral message to specific client

On this page