Skip to content

Interface: UseFieldPresenceResult

@roomful/react


@roomful/react / UseFieldPresenceResult

Defined in: react/src/index.ts:408

Describes the return value of useFieldPresence.

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: (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).

The active field id, or null.

string | null

void

Nothing.

getFieldPeers(fieldId): Peer[]

Defined in: react/src/index.ts:423

Returns the remote peers on a field from the current snapshot.

string

Peer[]