目前,我的控制台返回了我:
this.socket.join()不是函数
这是我的代码:
import io from 'socket.io-client';
this.socket=io();
...
roomStock.map(room =>{
console.log("room in roomStock.map: ", room)
console.log("this: ", this) // this is effectively defined
return this.socket.join(room.room)
})