Documentation
    Preparing search index...

    Function useLocalStorage

    • Returns a getter and setter to track the state of a local storage item with the given key, falling back to the optional default value when it isn't set.

      Type Parameters

      • T

      Parameters

      • itemKey: string
      • OptionaldefaultValue: T

      Returns [T, (value: T) => void]