Interface: UsePresenceOptions
このコンテンツはまだ日本語訳がありません。
Interface: UsePresenceOptions
Section titled “Interface: UsePresenceOptions”Defined in: react/src/use-presence.ts:18
Configuration for usePresence. Mirrors the subset of
WebSocketSubscriptionOptions that presence consumers care
about — the hook manages the connection lifecycle.
Properties
Section titled “Properties”
readonlyurl:string|undefined
Defined in: react/src/use-presence.ts:23
Full wss://…/sync/coordinator URL. When absent presence is
disabled and the hook returns an empty list.
readonlyoptionalroom?:string
Defined in: react/src/use-presence.ts:25
Room key. Defaults to "global".
token?
Section titled “token?”
readonlyoptionaltoken?:string| (() =>string|Promise<string>)
Defined in: react/src/use-presence.ts:30
Coordinator shared secret. Function form is re-invoked on reconnect so callers can refresh a rotating token.
userInfo?
Section titled “userInfo?”
readonlyoptionaluserInfo?:unknown
Defined in: react/src/use-presence.ts:38
The userInfo payload broadcast to peers. Change with care —
the hook re-establishes the WebSocket when this changes because
v1.0 coordinator has no in-session update path. See the
Presence guide
for the cadence caveat.
clientID?
Section titled “clientID?”
readonlyoptionalclientID?:string
Defined in: react/src/use-presence.ts:43
Presence identifier for this tab. When omitted the coordinator
assigns one and the local me result reflects that.