Skip to main content

useWebStorage

Callable

  • useWebStorage<T>(key: string, initialValue: ExcludeFunction<T>, storage: Storage, options?: any): readonly [name: T, methods: { resetStorage: () => void; setStorage: (value: React.SetStateAction<T>) => void }]

  • Type parameters

    • T

    Parameters

    • key: string
    • initialValue: ExcludeFunction<T>
    • storage: Storage
    • optionaloptions: any

    Returns readonly [name: T, methods: { resetStorage: () => void; setStorage: (value: React.SetStateAction<T>) => void }]