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.

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