Answer the question
In order to leave comments, you need to log in
React socket io How to send a message?
Good time of day there is a ready server on the socket
made import io from 'socket.io-client';
Created connection all is well
socket.on('message', function(msg) {
console.log(msg)
});
But I want to send a message
socket.emit('message', function(msg) {
console.log(msg)
});
But I have no idea how to send via input in html.
Send
Che, I can’t find how to add
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question