/real-time-graphs

Small project displaying a graph using data fetched with useQuery, updated in real time with websocket messages by invalidating queries.

Primary LanguageJavaScript

Small project displaying a graph using data fetched with useQuery, updated in real time with websocket messages by invalidating queries.

To run the app, npm i then npm start to start the websocket server (localhost:3001), API (localhost:3002) and SPA (localhost:3000) concurrently. Open the SPA on 2 split windows and click on one's Edit random product sales, both should be updated by sending the queryKeys to invalidate via WebSocket messages.