Vaultrice React SDK - v0.9.5
    Preparing search index...

    Function createNonLocalStore

    • Creates a simple store interface for a single key in NonLocalStorage. Provides fetch and post methods for retrieving and updating the value.

      Parameters

      • id: string

        The unique identifier for the NonLocalStorage instance.

      • key: string

        The key to store and retrieve data for.

      • options: UseGeneralOptions

        General options including credentials and instance options.

      Returns {
          fetch: () => Promise<undefined | ItemType>;
          post: (value: ValueType) => Promise<undefined | ItemType>;
      }

      An object with fetch and post methods:

      • fetch: Retrieves the current value for the key.
      • post: Sets a new value for the key.
      • fetch: () => Promise<undefined | ItemType>

        Fetches the value for the specified key from NonLocalStorage.

      • post: (value: ValueType) => Promise<undefined | ItemType>

        Stores a new value for the specified key in NonLocalStorage.