Practic BUI (Base UI) - v1.0.0
    Preparing search index...

    Variable persistReadValueConst

    persistReadValue: <T>(
        store: PersistKeyStore,
        attr: string | undefined,
        initialValue: T,
        format?: PersistFormat<T>,
    ) => T

    Reads one value from a store, or the initial value until one is stored: what every persisted state handle and hook reads, so they agree on it.

    Type Declaration

      • <T>(
            store: PersistKeyStore,
            attr: string | undefined,
            initialValue: T,
            format?: PersistFormat<T>,
        ): T
      • Type Parameters

        • T

        Parameters

        • store: PersistKeyStore

          Store of the value's key.

        • attr: string | undefined

          Attribute of the value; without one, the attribute a memory store keeps it under.

        • initialValue: T

          Value returned until one is stored, or when the format cannot read the stored one.

        • Optionalformat: PersistFormat<T>

          How the value is stored, when it has a format.

        Returns T