Skip to content

Function: useFieldPresence()

@roomful/vue


@roomful/vue / useFieldPresence

useFieldPresence<TPresence>(): UseFieldPresenceResult

Defined in: vue/src/index.ts:1477

Subscribes to field presence: which remote peers are active on which field. Declare the local peer’s field with setActiveField (e.g. on focus/blur) and read getFieldPeers(id) to render “who else is editing this” indicators.

TPresence extends PresenceData = PresenceData

The room presence shape.

UseFieldPresenceResult

A readonly ref for the active fields plus setActiveField and getFieldPeers.