MCPcopy Create free account
hub / github.com/ScrapeGraphAI/scrapecraft / useWebSocket

Function useWebSocket

frontend/src/hooks/useWebSocket.ts:4–16  ·  view source on GitHub ↗
(pipelineId: string)

Source from the content-addressed store, hash-verified

2import { useWebSocketStore } from '../store/websocketStore';
3
4export const useWebSocket = (pipelineId: string) => {
5 const { connect, disconnect } = useWebSocketStore();
6
7 useEffect(() => {
8 if (pipelineId) {
9 connect(pipelineId);
10 }
11
12 return () => {
13 disconnect();
14 };
15 }, [pipelineId, connect, disconnect]);
16};

Callers 1

AppFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected