Function: useStorage()
Call Signature
ts
function useStorage<P, M>(options): Ref<InferInputValue<P, UnwrapOption<M>>, InferInputWritable<P, UnwrapOption<M>>>;Defined in: storage/use-storage.ts:90
Keeps one value in a storage and returns a ref over it.
Type Parameters
| Type Parameter | Default type |
|---|---|
P extends ParserInput | undefined | undefined |
M | null |
Parameters
| Parameter | Type |
|---|---|
options | UseStorageOptions<P, M> & NotStorageState |
Returns
Ref<InferInputValue<P, UnwrapOption<M>>, InferInputWritable<P, UnwrapOption<M>>>
Call Signature
ts
function useStorage<T, W>(state): Ref<T, W>;Defined in: storage/use-storage.ts:98
Returns a ref over a state that defineStorageState defined.
Type Parameters
| Type Parameter |
|---|
T |
W |
Parameters
| Parameter | Type |
|---|---|
state | StorageState<T, W> |
Returns
Ref<T, W>