title: Async / Await Vuex
body: <p>I want to call an action in created hook, wait until is done and in same hook to display the result. Is that possible?</p>
  
  <p>I tried to put async / await in actions but doesn't help.<br>
  This is the <code>action</code> property with the async function in the <code>store</code>:</p>
  
  <pre><code> actions: {
      async FETCH_USER({commit}) {
        await firebase.firestore().collection('test').get().then(res =&gt; {
          commit('FETCH_USER', res.docs[0].data())
        })
      }
    }
  </code></pre>
  
  <pre><code>   created() {
       this.FETCH_USER()
       console.log(this.GET_USER)
     },
     methods: {
       ...mapActions([
         'FETCH_USER'
       ]),
       login() {
         if(this.$refs.form.validate()) {
           console.log('welcome')
         }
       }
     },
     computed: {
       ...mapGetters([
         'GET_USER'
       ])
     }
  </code></pre>
  
  <pre><code>export default new Vuex.Store({
    state: {
      user: null
    },
    getters: {
      GET_USER: state =&gt; state.user
    },
    mutations: {
      FETCH_USER(state, user) {
        state.user = user
      }
    },
    actions: {
      FETCH_USER({commit}) {
        firebase.firestore().collection('test').get().then(res =&gt; {
          commit('FETCH_USER', res.docs[0].data())
        })
      }
    }
  })
  </code></pre>