UNPKG

@nomyx/gun-sync

Version:

A lightweight, powerful library for synchronizing application state in real-time using Gun.js.

12 lines (11 loc) 518 B
import { IGunInstance } from 'gun'; /** * A lightweight, read-only hook to get a value from Gun.js. * * @param scope - A string to namespace the data. * @param key - The key for the data within the scope. * @param initialValue - The default value if none is set in the database. * @param gunInstance - Optional Gun instance. If not provided, uses context. * @returns The synchronized value. */ export declare function useGunValue<T>(scope: string, key: string, initialValue: T, gunInstance?: IGunInstance): T;