title: How to elegantly use v-model and Vuex store?
body: <p>I search for a clean way to use v-model and vuex store.</p>
  
  <p>Vuex provide several helpers methods are pretty usefull but a little bit annoying when using with v-model.</p>
  
  <p>The way I do today to use v-model and my modularized store is like</p>
  
  <pre><code>computed: {
    type: {
      get() {
        return this.$store.state.mymodule.type;
      },
      set(newValue) {
        this.$store.dispatch('mymodule/setType', newValue)
      }
  }
  </code></pre>
  
  <p>This works BUT I found better to take profit of vuex helpers to avoid boilerplate code (this.$store, module name, ...)</p>
  
  <p>Ok, so I firstly want to get rid of module name. Vuex provide a great <em>createNamespacedHelpers</em> which return modularized helpers.</p>
  
  <p>Let's use it :</p>
  
  <pre><code>import { createNamespacedHelpers } from 'vuex'
  
  const { mapState, mapActions } = createNamespacedHelpers('some/nested/module')
  </code></pre>
  
  <p>So, ok, we now have a clean mapState and mapActions functions which are module dedicated.</p>
  
  <pre><code>computed: {
    ...mapState(['type']) // No need here to specify module name :)
  }
  </code></pre>
  
  <p>Pretty cool but since mapState has only get function, I can't set a dispatch function to update data...</p>
  
  <p>In case of using v-model, I find helpers unusable. I can't use mapState, thus I can't use createNamespacedHelpers.</p>
  
  <p>So : How can I use the benefit of Vuex helpers functions and v-model to work together ?</p>