Open
Description
in $subscribe ,I use console
to print the mutations and states when the states change :
store.$subscribe((mutations, state) => {
console.log('states change :', mutations, state);
});
it works correct when I change the state directly or use $pacth
singlely
// the both ways of the follow work correct
// 1. change directly : ouput is { type:‘direct’ ,... }
store.count++
// 2.use $patch : output is {type: 'patch object',...}
store.$patch({
key: `${Math.random()}`,
});
but when I use them together as follow,the mutation with type of 'direct' will miss ,there is only {type: 'patch object',...} on console , and the count
value printed was still the old value, actually had increased . seem to not be detected ?
store.$patch({
key: `${Math.random()}`,
});
store.count++
Metadata
Metadata
Assignees
Type
Projects
Status
📋 Backlog