Function: useSessionStorage()
ts
function useSessionStorage<P, M>(options): Ref<InferInputValue<P, UnwrapOption<M>>, InferInputWritable<P, UnwrapOption<M>>>;Defined in: storage/use-storage.ts:148
Keeps one value in session storage, which belongs to one tab, and returns a ref over it.
Type Parameters
| Type Parameter | Default type |
|---|---|
P extends ParserInput | undefined | undefined |
M | null |
Parameters
| Parameter | Type |
|---|---|
options | UseSessionStorageOptions<P, M> |
Returns
Ref<InferInputValue<P, UnwrapOption<M>>, InferInputWritable<P, UnwrapOption<M>>>