DEV Community


Posted on

SOCKET.IO real time notificaion

what i am trying to implement is the real time notification.

Things which are working accordingly are

1.Able to send request
2.Data fetched by server and hence db updates
3.Notification is real time

The problem I am facing is:
Once the user is connected to a particular room say localhost:3000/user/user123 then the user123 (logged in user) is able to get its notification for the request but once i change the room say i visit localhost:3000/ the notification vanishes.

What I expect it to be doing:
I want that irrespective of the room or any page in the website the user is at he should get the notification.

Here is the code:
server side-
client side-

Top comments (0)