Function: useLockState()
@roomful/vue / useLockState
Function: useLockState()
Section titled “Function: 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).
Type Parameters
Section titled “Type Parameters”TPresence
Section titled “TPresence”TPresence extends PresenceData = PresenceData
The room presence shape.
Parameters
Section titled “Parameters”string
The lock key to observe.
Returns
Section titled “Returns”ReadonlyRef<LockState | null>
A readonly ref holding the current lock state, or null when free.