Interface ReactiveStorage
Defined in: storage/storage.ts:116
A reactive wrapper around the Web Storage API (localStorage/sessionStorage) that provides signal-based access to storage items and length.
Will automatically update when storage events occur in other tabs/windows.
Implements
Methods
clear()
clear(): void;Defined in: storage/storage.ts:309
Clears all keys from Storage, triggering reactivity
Returns
void
Implementation of
Storage.cleargetItem()
getItem(key): string | null;Defined in: storage/storage.ts:203
Reactive access to Storage contents
Parameters
key
string
Returns
string | null
Implementation of
Storage.getItemkey()
key(index): string | null;Defined in: storage/storage.ts:324
Reactive access to the key at the given index
Parameters
index
number
Returns
string | null
Implementation of
Storage.keypeekItem()
peekItem(key): string | null;Defined in: storage/storage.ts:181
Non-reactive way to peek the current value of a key in Storage
Parameters
key
string
Returns
string | null
removeItem()
removeItem(key): void;Defined in: storage/storage.ts:287
Remove a value from Storage, triggering reactivity
Parameters
key
string
Returns
void
Implementation of
Storage.removeItemsetEffect()
setEffect(key, fn): void;Defined in: storage/storage.ts:126
Parameters
key
string
fn
(value) => void
Returns
void
setItem()
setItem(key, value): void;Defined in: storage/storage.ts:228
Set a value in Storage, triggering reactivity
Parameters
key
string
value
string
Returns
void
Implementation of
Storage.setItemProperties
length
Get Signature
get length(): number;Defined in: storage/storage.ts:174
Reactive access to the number of keys in Storage
Returns
number
Implementation of
Storage.length