title: Vue.js 2, WATCH "Error in callback for watcher "yourAccountsState": "ReferenceError: value is not defined""
body: <p>I have the following WATCH property watching my v-model data (this is for checkboxes and I'm using bootstrap-vue).  </p>
  
  <p>I think my mistake is in how I'm setting the value in either the WATCH or how it is being called in my store?  (is it an issue because an array is being sent over?)  </p>
  
  <p>I can console inside the WATCH, but when I dispatch, then I get the error.  </p>
  
  <p>Here is the checkbox markup:</p>
  
  <pre><code>&lt;b-form-group label="Using sub-components:"&gt;
          &lt;b-form-checkbox-group id="checkboxes1" name="flavour1" v-model="yourAccounts"&gt;
              &lt;b-form-checkbox :value="test.value" class="card" v-for="test in filteredList" :key="bank.text"&gt;
                  {{ test.text }}
              &lt;/b-form-checkbox&gt;
          &lt;/b-form-checkbox-group&gt;
  &lt;/b-form-group&gt;
  </code></pre>
  
  <p>the computer property:</p>
  
  <pre><code>computed: {
      yourAccountsState: {
          get() {
              // console.log(this.yourAccounts);
              return this.yourAccounts
          },
      }
  },
  watch: {
      yourAccountsState(value) {
          this.$store.dispatch('setTestAccounts', value);
  
          console.log(value);
      }
  }
  </code></pre>
  
  <p>In my store.js I have the following imported from a modules</p>
  
  <pre><code>        const state = {
      TestAccounts: []
  }
  
  const mutations = {
      // from v-modal on selected accounts page
      SET_SELECTED_TESTS (state, testAccount) {
          state.TestAccounts = testAccount
      }
  }
  
  const actions = {
      setTestAccounts: ({commit}) =&gt; {
          commit('SET_SELECTED_TESTS', value);
      }
  }
  
  const getters = {
      yourAccounts: state =&gt; {
          return state.TestAccounts
      }
  }
  
  export default {
      state,
      mutations,
      actions,
      getters
  }
  </code></pre>