title: Vue3 composition api watch store value
body: <p>I want to detect changes in a vuex state value by watching it in a Vue Component. I am currently using vue 3 with the composition api. I've tried this approach:</p>
  <pre class="lang-js prettyprint-override"><code>setup(props) {
     const store = useStore();
  
     watch(store.getters.myvalue, function() {
        console.log('value changes detected');
     });
  
     return {
        myvalue: computed(() =&gt; store.getters.myvalue)
     }
  },
  </code></pre>
  <p>But the console log statement will not be called when myvalue is changed.</p>