title: VueJS - Access to Store data from mounted method?
body: <p>I'm trying to get access to my store data from a mounted method of my component. It works fine if I try it with a not mounted method. After I read a bit it makes sense that I've no access, but is there any other way I didn't find yet?</p>
  
  <pre><code>methods: {
      testEvent() {
          // works
          let players = this.$store.state.players;
          console.log(players);
      },
      socketEvent() {
          // Uncaught TypeError: Cannot read property 'state' of undefined
          socket.on('dice_data', function(data) {
              let players = this.$store.state.players;
              console.log(players);
          });
      }
  },
  mounted() {
      this.socketEvent()
  }
  </code></pre>
  
  <p>Thank you</p>