title: How can I update state in vuex ? vue.js 2
body: <p>My vue component is like this :</p>
  
  <pre><code>&lt;template&gt;
      &lt;div&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-sm-3"&gt;
                  &lt;div class="form-group"&gt;
                      &lt;label for="status" class="sr-only"&gt;Status&lt;/label&gt;
                      &lt;select class="form-control" v-model="selected" @change="filterByStatus()"&gt;
                          &lt;option value=""&gt;All Status&lt;/option&gt;
                          &lt;option v-for="status in orderStatus" v-bind:value="status.id"&gt;{{ status.name }}&lt;/option&gt;
                      &lt;/select&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          ...
      &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
      import { mapActions, mapGetters } from 'vuex';
      export default {
          ...
          data() {
              return { selected: '' }
          },
          methods: {
              filterByStatus: function() {
                  this.$store.state.status = this.selected
              }
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>My modules order vuex is like this :</p>
  
  <pre><code>import { set } from 'vue'
  import order from '../../api/order'
  import * as types from '../mutation-types'
  
  const state = {
      status: ''
  }
  const getters = {
      ...
  }
  const actions = {
      ...
  }
  
  const mutations = {
      ...
  }
  
  export default {
      state,
      getters,
      actions,
      mutations
  }
  </code></pre>
  
  <p>I use this : <code>this.$store.state.order.status = this.selected</code>, to update state when executed, but there exist error like this :</p>
  
  <blockquote>
    <p>[Vue warn]: Error in callback for watcher "function () { return
    this._data.$$state }":  (found in )</p>
    
    <p>Error: [vuex] Do not mutate vuex store state outside mutation
    handlers.</p>
  </blockquote>
  
  <p>How can I solve it?</p>
  
  <p>I want update state, because I want the value used by component another</p>