Function: useLocalStorage()
ts
function useLocalStorage<P, M>(options): Ref<InferInputValue<P, UnwrapOption<M>>, InferInputWritable<P, UnwrapOption<M>>>;Defined in: storage/use-storage.ts:135
Keeps one value in local storage, which every tab of the site shares, and returns a ref over it.
Type Parameters
| Type Parameter | Default type |
|---|---|
P extends ParserInput | undefined | undefined |
M | null |
Parameters
| Parameter | Type |
|---|---|
options | UseLocalStorageOptions<P, M> |
Returns
Ref<InferInputValue<P, UnwrapOption<M>>, InferInputWritable<P, UnwrapOption<M>>>