Relative Content

Tag Archive for javareactjsspring-bootwebsocketstomp

Spring boot websocket + react -> not receiving messages from backend

I’m using react/typescript as a frontend and springboot as a backend.
My app can connect to the backend via websocket, can aslo subscribe for a channel, can also send message from frontend to backend but on frontend side I can’t see any messages from backend. I checked that messages are sent from backend to the frontend but on frontend side I can’t see any updates.

Real-time messaging with WebSocket

I’ve recently started to work with websockets and I’m not sure what is the best approach for what I need.
For backend I’m using spring boot/java and frontend react/typescript. What I need is to have button start counting and when user click on the button it will trigger function on the backend to start counting from 1 to 10 and it will send frontend updates(multiple messages) regarding counting. Under the button on frontend there will be Counting: {count} to let user know what is the status.