I write an electron app recently, and now I am facing a very weird problem.
In the mutation, I wrote like this (Source 29-31)
[types.EDIT_ARTICLE] (state, {id, key, value}) {
state.articles[id]['lastModifiedTime'] = Date.now();
state.articles[id][key] = value;
}
In the component (Source 36-38)
computed: {
article() {
return this.$store.state.articles[this.id];
}
}
after this.$store.commit, the view does not auto update, but I can view the data change from vue-devtool; then if I click the last commit, or commit all, then every change will auto update the view.
I have tried array.splice, array = array, Vue.set, or everything I can find on google, but none of them works. Then I want to open an issue so I created a small fiddle, but it works...
Could anybody give me some advice, or some inspiration? With much appreciated.
Your issue seems usage/support question. If you want to ask such question, please use our forum or gitter. The issue list is reserved exclusively for bug reports and feature requests.
Thanks.
Also, in store/index.js (L30), could you explain what is initial state? (On forum 馃槈)
For those who came here accidentally, you may looks for solution here
stackoverflow link
Most helpful comment
For those who came here accidentally, you may looks for solution here
stackoverflow link