• Provides a ref-variable (like useRef) but also stores it value in the local storage and is used like useState.

    Type Parameters

    • T

      type of the ref-variable

    Parameters

    • key: string

      the name/key for the storage value

    • defaultValue: T

      default value

    Returns [T, Dispatch<SetStateAction<T>>]

    {[T, Dispatch<SetStateAction>]} [value,setter] array like when using useState

    Export

Generated using TypeDoc