From 4227366f2fa07d2d9fd93e068fd0f9b9bec13786 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Fri, 21 Jun 2024 22:19:16 +0530 Subject: [PATCH] chore: docs --- src/context/socket.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/context/socket.tsx b/src/context/socket.tsx index c930019d..93432014 100644 --- a/src/context/socket.tsx +++ b/src/context/socket.tsx @@ -24,6 +24,7 @@ export const SocketProvider = ({ children }: { children: JSX.Element }) => { const [id, setActiveId] = useState(socketStore.id); const setId = useCallback((id: string) => { + // the socket client connection is recomputed whenever id changes -> the new browser has been initialized const socket = io(`${SERVER_ENDPOINT}/${id}`, { transports: ["websocket"],