Use watch in store pattern
<p>Here is what I wanna do:
I have a component, one of its data is read from a shared object, and every time the value changed, I wanna know and do something about it. So I decided to use watch to that property. Here is my code looks like:</p>

<pre><code>export default {                                          
data: function () {
  return {
    index: sharedData
  }
}, 
watch: {
  'index': function (val) {
       doSmething()
  }
} 
}
</code></pre>

<p>and my sharedData is very simple , just for demo:</p>

<pre><code>let shatedData = {                                         
  testIndex: 0
}
</code></pre>

<p>Like the guide says , sharedData is an object.
But here comes the problem: the change of sharedData in this component, or event in other compoent, can be displayed correctly in index property, but the watch function is never fired(maybe I was listening to an object to change, but its structure is still the same).
So how can I do to let this component know that one specific shared data changed?</p>