Skip to content

Function: useLockState()

@roomful/solid


@roomful/solid / useLockState

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

Defined in: solid/src/index.ts:1442

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.

Accessor<LockState | null>

The current lock state accessor, resolving to null when free.