[Vuejs]-Vue.js socket.io v-for list items data miss assignment

0๐Ÿ‘

โœ…

Canโ€™t believe it is that simple, I just added an if condition and everything worked fine. actually I feel very stupid already ๐Ÿ˜€ ๐Ÿ˜€

socket.on('room:App\\Events\\UserJoined', function(data) {
      if(this.room.id == data.payload.roomId){
        this.usersCount = data.payload.usersCount;
      }
    }.bind(this));

Thanks to everyone who viewed my question trying to help

Leave a comment