Vaultrice React SDK - v1.1.0
    Preparing search index...

    Function useNonLocalGeneralState

    • React hook for managing a single value in NonLocalStorage.

      Provides a simple interface to read and update a value for a given key, with error handling and atomic operations.

      Type Parameters

      • VT extends ValueType

        The type of value to store.

      Parameters

      • id: string

        The unique identifier for the NonLocalStorage instance.

      • key: string

        The key to store and retrieve data for.

      • options: UseNonLocalStorageOptions

        Options for NonLocalStorage, including credentials and instance options.

      Returns UseNonLocalGeneralStateReturn<VT>

      A tuple containing:

      • value: The current value for the specified key.
      • actions: Object with various action methods (setItem, push, splice, merge, setIn, etc.).
      • error: Any error encountered during operations.
      • isLoading: Loading state.