title: Cannot access state by getters vuex vuejs
body: <p>I am new to vuex I want to access user object that is inside in state by the getters getUser() method, I tried to call this
  <strong>console.log(this.$store.getters.getUser);</strong> in mounted method but no results.
  I tried to console log inside mutations and it return the user object.
  I also followed documentations and googled the solutions but nothing happen</p>
  <p>What else am I missing?</p>
  <p>store.js</p>
  <pre><code>import Vue from 'vue';
  import Vuex from 'vuex';
  
  Vue.use(Vuex);
  
  const store = new Vuex.Store({
  state: {
      user: {},
  },
  getters: {
      getUser: state =&gt; {
         return state.user
       }
      
  },
  mutations: {
      auth_user(state,data) {
          state.user = data
      }
   },
  actions: {
      fetchAuthUser(context){
          axios.get('/user-data').then(response =&gt; {
              context.commit(&quot;auth_user&quot;,response.data)
          }).catch({});
      }
  }, 
  
   })
  
  
   export default store
  </code></pre>
  <p>Index.js</p>
  <pre><code>  mounted(){
    // this.auth_user;
     this.getCategories();
     this.$store.dispatch('fetchAuthUser', this.auth_user);
      console.log(this.$store.getters.getUser);
  },
  </code></pre>