Display Game Information
Learn how to broadcast messages and the current information of an ongoing game.
Next, use socket.broadcast.to
to send a message
event to let all other players in the room know when a new player has joined the game.
Task 7: Let players know a new player has joined with socket.broadcast.to
Next, we’ll use socket.broadcast.to
to send a message
event to let all other players in the room know when a new player has joined the game
- Add the highlighted code in the
src/index.js
file:
Get hands-on with 1400+ tech skills courses.