Function useLocalStorage

  • Hook for storing information to LocalStorage. Note that if you use this same hook in multiple component instances, these will not share state! If you want that behavior, you should use this hook inside a Context object.

    Type Parameters

    Type Parameters

    • T

    Parameters

    • key: string
    • initialValue: T

    Returns [T, SetLocalStorageValue<T>]

Generated using TypeDoc