title: Setting value to input field using Vuex store modules
body: <p>I have a vuex in module mode that fetching the data of a user: </p>
  
  <p><strong>store/modules/users.js</strong></p>
  
  <pre><code>import axios from "axios";
  
  export const state = () =&gt; ({
    user: {}
  });
  
  // Sets the values of data in states
  export const mutations = {
    SET_USER(state, user) {
      state.user = user;
    }
  };
  
  export const actions = {
    fetchUser({ commit }, id) {
      console.log(`Fetching User with ID: ${id}`);
      return axios.get(`${process.env.BASE_URL}/users/${id}`)
        .then(response =&gt; {
          commit("SET_USER", response.data.data.result);
        })
        .catch(err =&gt; {
          console.log(err);
        });
    }
  };
  
  // retrieves the data from the state
  export const getters = {
    getUser(state) {
      return state.user;
    }
  };
  </code></pre>
  
  <p>then on my template <strong>pages/users/_id/index.vue</strong></p>
  
  <pre><code>&lt;b-form-input v-model="name" type="text"&gt;&lt;/b-form-input&gt;
  
  export default {
    data() {
      return {
        name: ""
      }
    },
    created() {
      // fetch user from API
      this.$store.dispatch("fetchUser", this.$route.params.id);
    }
  }
  </code></pre>
  
  <p>Now I check the getters I have object <strong>getUser</strong> and I can see the attribute. How can I assign the <strong>name</strong> value from vuex getters to the input field?</p>