Kvaser CanKing GUI Extensions SDK - v7.5.1
    Preparing search index...

    Function useSessionData

    • A hook for data that should be saved to the session data.

      Type Parameters

      • T

      Parameters

      • id: number

        The unique id of the view.

      • defaultValue: T | (() => T)

        The default value or a function that returns the default value.

      • OptionalloadedCallback: (value: T) => void

        Optional callback invoked once after data is loaded.

      Returns {
          sessionData: T;
          sessionDataIsInitialized: boolean;
          setSessionData: Dispatch<SetStateAction<T>>;
      }

      An object with the current session data, a setter, and an initialization flag.