Emit an event when a specific piece of state changes in vuex store : <p>I have a vuex store with the following state:</p>

<pre><code>state: {
    authed: false
    ,id: false
}
</code></pre>

<p>Inside a component I want to watch for changes to the <code>authed</code> state and send an AJAX call to the server. It needs to be done in various components.</p>

<p>I tried using <code>store.watch()</code>, but that fires when either <code>id</code> or <code>authed</code> changes. I also noticed, it's different from <code>vm.$watch</code> in that you can't specify a property. When i tried to do this:</p>

<pre><code>store.watch('authed',function(newValue,oldValue){
  //some code
});
</code></pre>

<p>I got this error:</p>

<p><code>[vuex] store.watch only accepts a function.</code></p>

<p>Any help is appreciated!</p>
