TypeError: undefined is not an object (evaluating 'socket.emit')
const joinRoom = () => {
if(name && roomId) {
socket.emit('join-room', {
roomId: roomId,
userName: name,
})
}
}