Function: useFieldPresence()
@roomful/react / useFieldPresence
Function: useFieldPresence()
Section titled “Function: useFieldPresence()”useFieldPresence<
TPresence>():UseFieldPresenceResult
Defined in: react/src/index.ts:1526
Subscribes to field presence: which remote peers are active on which field. Declare the local
peer’s field with setActiveField (e.g. on input focus) and read getFieldPeers(id) to render
“who else is editing this” avatars. Purpose-built for collaborative forms, tables, and records.
Type Parameters
Section titled “Type Parameters”TPresence
Section titled “TPresence”TPresence extends PresenceData = PresenceData
The room presence shape.
Returns
Section titled “Returns”The reactive active fields plus setActiveField and getFieldPeers.