Use object for websocket messages
Strings are unreliable (typos happen), it should be done with an object of valid values.
So for example instead of sending "vote"
, we send messages.vote
Strings are unreliable (typos happen), it should be done with an object of valid values.
So for example instead of sending "vote"
, we send messages.vote