Rxova
Skip to content

Presence

readonly clientId: string;
close(): void;

void


getPeers(): readonly Peer[];

Stable array snapshot (replaced on change) — safe for useSyncExternalStore.

readonly Peer[]


setMetadata(metadata): void;

Publish new metadata for this client, announcing it to peers.

A no-op when the value has not actually changed, so calling it on every render — which is what a hook does — costs nothing and announces nothing.

ParameterType
metadataunknown

void


subscribe(fn): () => void;
ParameterType
fn() => void

() => void