Skip to content

Function: useLockState()

@roomful/vue


@roomful/vue / useLockState

useLockState<TPresence>(key): ReadonlyRef<LockState | null>

Defined in: vue/src/index.ts:1701

Subscribes to the resolved state of a single lock key (the lock-on-focus pattern: read holder to decide whether the local peer owns the key).

TPresence extends PresenceData = PresenceData

The room presence shape.

string

The lock key to observe.

ReadonlyRef<LockState | null>

A readonly ref holding the current lock state, or null when free.