Function: useFieldPresence()
@roomful/vue / useFieldPresence
Function: useFieldPresence()
Section titled “Function: 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.
Type Parameters
Section titled “Type Parameters”TPresence
Section titled “TPresence”TPresence extends PresenceData = PresenceData
The room presence shape.
Returns
Section titled “Returns”A readonly ref for the active fields plus setActiveField and getFieldPeers.