Skip to main content

Function: useStorage()

Call Signature

useStorage<T>(key, defaultValue, options?): [T, Setter<T>]

Defined in: useStorage.ts:16

Type Parameters

T

Parameters

key

string

defaultValue

T

options?

Partial<{ logger: (error) => void; parser: Parser<T>; serializer: Serializer<T>; storage: Storage; syncData: boolean; }>

Returns

[T, Setter<T>]

Call Signature

useStorage<T>(key, defaultValue?, options?): [T | undefined, Setter<T>]

Defined in: useStorage.ts:22

Type Parameters

T

Parameters

key

string

defaultValue?

undefined

options?

Partial<{ logger: (error) => void; parser: Parser<T>; serializer: Serializer<T>; storage: Storage; syncData: boolean; }>

Returns

[T | undefined, Setter<T>]