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

    Function useNonLocalCounter

    • React hook for managing a numeric counter in NonLocalStorage.

      Provides functions to increment and decrement the counter value atomically, with error handling and metadata updates.

      Parameters

      • id: string

        The unique identifier for the NonLocalStorage instance.

      • key: string

        The key to store and retrieve the counter value.

      • options: UseNonLocalStorageOptions

        Options for NonLocalStorage, including credentials and instance options.

      Returns any[]

      A tuple containing:

      • value: The current counter value.
      • increment: Function to increment the counter.
      • decrement: Function to decrement the counter.
      • error: Any error encountered during operations.