Lilact
    Preparing search index...

    Function useLocalStorage

    • Persists state in localStorage and keeps it in sync with the app.

      Parameters

      • key: string | any[]

        localStorage key. If an array is provided, the array members are joined as key.

      • initialValue: any

        Initial value used if nothing exists in localStorage.

      Returns any

      Stored state/result.