cockpit-plugin-base-react - v1.1.1
    Preparing search index...

    Function useSessionStorage

    • Typed sessionStorage hook. Value is scoped to the current tab and is not shared across tabs (sessionStorage semantics).

      Type Parameters

      • T

      Parameters

      • key: string

        sessionStorage key.

      • defaultValue: T

        Value used when the key is absent or unreadable.

      • options: SessionStorageOptions<T> = {}

        Optional serialization config.

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

      [value, setValue, remove]