[Vuejs]-How to access vue component data from socket.io listener function?

0👍

You should use arrow functions when you want to pass the global context (this) to the function being invoked.

this.$socket.on('join-room-error', (err) => {
          this.errorLog = err
        })

Leave a comment