UNPKG

react-native-devtools-sync

Version:

A tool for syncing React Query state to an external Dev Tools

32 lines (31 loc) 1.03 kB
import { Socket } from "socket.io-client"; import { PlatformOS } from "./platformUtils"; interface Props { deviceName: string; socketURL: string; persistentDeviceId: string | null; extraDeviceInfo?: Record<string, string>; platform: PlatformOS; /** * Enable/disable logging for debugging purposes * @default false */ enableLogs?: boolean; } /** * Hook that handles socket connection for device-dashboard communication * * Features: * - Singleton pattern for socket connection * - Platform-specific URL handling for iOS/Android/Web * - Device name identification * - Connection state tracking * - User list management */ export declare function useMySocket({ deviceName, socketURL, persistentDeviceId, extraDeviceInfo, platform, enableLogs, }: Props): { socket: Socket<import("@socket.io/component-emitter").DefaultEventsMap, import("@socket.io/component-emitter").DefaultEventsMap>; connect: () => void; disconnect: () => void; isConnected: boolean; }; export {};