UNPKG

@nomyx/gun-sync

Version:

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

14 lines (13 loc) 488 B
import { IGunInstance } from 'gun'; export interface PresenceInfo { id: string; lastSeen: number; } /** * A React hook to track user presence within a specific scope. * * @param scope - A string to namespace the presence data. * @param gunInstance - Optional Gun instance. If not provided, uses context. * @returns An array of `PresenceInfo` objects for all active users. */ export declare function useGunPresence(scope: string, gunInstance?: IGunInstance): PresenceInfo[];