Interface: UseFieldPresenceResult
@roomful/react / UseFieldPresenceResult
Interface: UseFieldPresenceResult
Section titled “Interface: UseFieldPresenceResult”Defined in: react/src/index.ts:408
Describes the return value of useFieldPresence.
Properties
Section titled “Properties”fields
Section titled “fields”fields:
FieldPresenceState[]
Defined in: react/src/index.ts:413
Every field with at least one remote peer, ordered by field id. Reactive: re-renders when peers enter or leave a field.
setActiveField()
Section titled “setActiveField()”setActiveField: (
fieldId) =>void
Defined in: react/src/index.ts:418
Declares the field the local peer is active on, or null to clear it. Stable across renders.
Declares the field the local peer is active on, or null to clear it (e.g. on blur).
Parameters
Section titled “Parameters”fieldId
Section titled “fieldId”The active field id, or null.
string | null
Returns
Section titled “Returns”void
Nothing.
Methods
Section titled “Methods”getFieldPeers()
Section titled “getFieldPeers()”getFieldPeers(
fieldId):Peer[]
Defined in: react/src/index.ts:423
Returns the remote peers on a field from the current snapshot.
Parameters
Section titled “Parameters”fieldId
Section titled “fieldId”string
Returns
Section titled “Returns”Peer[]