UNPKG

socket.io-react-hooks-advanced

Version:

A modular and extensible React + Socket.IO hook library designed for real-world applications. Supports namespaced sockets, reconnection strategies, offline queues, latency monitoring, middleware, encryption, and more.

7 lines (5 loc) 165 B
import {useContext} from "react"; import {SocketContext} from "../context/SocketContext"; export const useSocket = () => { return useContext(SocketContext); };