the official document says that asynchronous modification of the state will not take effect: https://vuex.vuejs.org/zh-cn/.
but the following code does change the value:
mutations: {
increment: (state)=>{
window.fetch("https://jsonplaceholder.typicode.com/posts/1")
.then(response => response.json())
.then(json => {
state.countPP
})
},
decrement: state => state.count--
}
sample address
https://jsfiddle.net/justforu.
do I understand something wrong?