title: How to set value of array object property inside a promise in VueJS?
body: <p>I am using <a href="http://feathersjs.com" rel="nofollow noreferrer">feathersjs</a> with <a href="https://github.com/feathersjs/feathers-client" rel="nofollow noreferrer">feathers-client</a> with VueJS and I get a <code>Cannot set property 'employees' of undefined</code> typeerror. This is my code:</p>
  
  <pre><code>&lt;template&gt;
    &lt;ul&gt;
      &lt;li v-for="employee in employees"&gt;{{employee.name}}&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import feathers from 'feathers/client'
  import socketio from 'feathers-socketio/client'
  import hooks from 'feathers-hooks'
  import io from 'socket.io-client'
  
  const socket = io('localhost:3030')
  var app = feathers().configure(hooks())
                      .configure(socketio(socket))
                      .configure(authentication({ storage: window.localStorage }));
  
  export default {
   data() {
     return {
       employees: []
     }
   },
   mounted() {
       app.authenticate().then(function(response) {
            app.service('users').find().then(function(users) {
              this.employees = users.data
            })
          }, function(error) {
            console.log(error)
          })
     }
  }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>And when I run it I get </p>
  
  <pre><code>Uncaught (in promise) TypeError: Cannot set property 'employees' of undefined
  </code></pre>
  
  <p>in the console.</p>
  
  <p>Am I doing something wrong here?</p>