Element type stored in the array.
NonLocalStorage instance id (room/store id).
Key identifying the array value.
Hook options (credentials, instanceOptions, bind).
A tuple:
Example: const [items, { push, setArray }, error, isLoading] = useNonLocalArray<{ id:number, text:string }>('room1', 'todos', { credentials: {...} })
await push({ id: 1, text: 'Buy milk' }) await setArray([{ id: 1, text: 'Buy milk' }])
React hook for managing an array in NonLocalStorage with atomic operations.
Provides reactive access to an array stored under
keyon a NonLocalStorage instance. The hook returns the current array (defaulting to []), an actions object with atomic helpers (push, setArray), an error value and a loading flag.Features: