コンテンツにスキップ

Interface: UsePresenceResult

このコンテンツはまだ日本語訳がありません。

Defined in: react/src/use-presence.ts:46

readonly all: readonly PresenceEntry[]

Defined in: react/src/use-presence.ts:48

Every peer in the room, this client included.


readonly peers: readonly PresenceEntry[]

Defined in: react/src/use-presence.ts:50

Peers excluding this client. Convenient for cursor / avatar UIs.


readonly me: PresenceEntry | null

Defined in: react/src/use-presence.ts:56

This client’s own presence entry — matched by clientID. When the hook hasn’t received a snapshot yet or the clientID hasn’t been assigned, this is null.


readonly connecting: boolean

Defined in: react/src/use-presence.ts:58

true while the WebSocket is connecting or reconnecting.


readonly error: string | null

Defined in: react/src/use-presence.ts:60

Last connection error message, if the socket is currently down.