The resource scope string, e.g. "p-1/my-bucket/photos/".
Returns:
locks — active lock records intersecting the scope.isLocked — true when any lock intersects.blockedActions — command ids that must be disabled due to active locks.Implementation note: we subscribe to the raw locks array and filter in
the selector so that Zustand can determine reference equality. Calling
s.byScope(scope) from the selector would create a new array on every
render even when the locks array hasn't changed, causing infinite re-renders.
React hook that returns lock state for a given resource scope.