Vue 2.1 calling method in beforeCreate hook is not working
<p>I am making an async call to some local <code>json</code> data before my component is created. So this code actually works fine:</p>

<pre><code>  beforeCreate : function() {
    var self = this;
      fetch('/assets/data/radfaces.json')
        .then(function(response) { return response.json()
        .then( function(data) { self.users = data; } );
      })
        .catch(function(error) {
        console.log(error);
      });
  },
</code></pre>

<p>Now I just want to refactor and move this to a separate method:</p>

<pre><code>  beforeCreate : function() {
    this.fetchUsers();
  },

  methods: {
    fetchUsers: function() {
      var self = this;
      fetch('/assets/data/radfaces.json')
        .then(function(response) { return response.json()
        .then( function(data) { self.users = data; } );
      })
        .catch(function(error) {
        console.log(error);
      });
    }
  }
</code></pre>

<p>And now everything stops working. I get an error: <code>app.js:13 Uncaught TypeError: this.fetchUsers is not a function(…)</code></p>

<p>Why can't I access the <code>fetchUsers</code> method in the <code>beforeCreate</code> hook? What is the work around?</p>