Practic Persist - v1.0.0
    Preparing search index...

    Function persistReadValue

    • 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 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