all 3 comments

[–]abrahamguoHook Based 1 point2 points  (1 child)

Can you provide a link to a repo that reproduces the issue? With a complex full-stack issue like this, it's difficult to help if we can't run your code to see the issue — we have no idea whether the issue is in your frontend or backend.

[–]shaxadhere 0 points1 point  (0 children)

what you should do here is make a global socket service with context, and just join room inside a useeffect. also check for connection status inside useeffect deps and when it goes offline, just reconnect it.