Function: useFieldPresence()
@roomful/solid / useFieldPresence
Function: useFieldPresence()
Section titled “Function: useFieldPresence()”useFieldPresence<
TPresence>():UseFieldPresenceResult
Defined in: solid/src/index.ts:1283
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”The active fields accessor plus setActiveField and getFieldPeers.