title: Nuxt vuex - moving store from Vue
body: <p>I have been fiddling with moving a tutorial I did in Vue to Nuxt.  I have been able to get everything working, however I feel I'm not doing it the &quot;proper way&quot;.  I have added the Nuxt axios module, but wasnt able to get it working, so I ended up just using the usual axios npm module.  Here is my store:</p>
  <pre><code>import Vue from 'vue'
  import Vuex from 'vuex'
  import axios from 'axios'
  import VueAxios from 'vue-axios'
  
  Vue.use(Vuex)
  Vue.use(VueAxios, axios)
  
  export const state = () =&gt; ({
    events: []
  })
  
  export const mutations = {
    setEvents: (state, events) =&gt; {
      state.events = events
    }
  }
  
  export const actions = {
    loadEvents: async context =&gt; {
      let uri = 'http://localhost:4000/events';
      const response = await axios.get(uri)
      context.commit('setEvents', response.data)
    }
  }
  </code></pre>
  <p>I would like to know how to re-write this store using the @nuxtjs/axios module.  I also didnt think I'd need to import vuex here, but if I dont, my app doesn't work.</p>
  <p>Thanks for any help!</p>