Fix room joining on refresh, user see a pending state
Opened this issue · 0 comments
dbertella commented
Theory:
This is probably happening because of the order of events. Currently, it might be possible for the game state event to arrive before the handler for it has been initialised.
A possible solution for it is to split the current game state event, to one initial one, and the update one. The Game component would always have to ask explicitely for the current game state and only move on after server has responded (using socket.io callbacks). Then, it listens to game update events.