Closed ericksonc closed 4 years ago
As a workaround, I'm storing all my state in the root store, and only putting getters / actions / mutations in modules. Getters in modules seem to be reactive to multiple pieces of state if they're in root, just not if they're in the module itself.
Oops, never mind, so I realized I just needed to add state decorators in front of each piece of state, yeesh
I'm submitting a ... [ X ] bug report
Summary
Getters in modules are only reactive to a single state variable of the module.
Steps to reproduce:
In Chrome dev console:
Although setB is correctly setting the state of "b", the value of sumAB will only be recomputed when the state of "a" has changed.
No matter what, getters in modules can only be reactive to a single piece of state in that module.
Note that, if the code above is placed in the store root instead of a module, it will run as expected, being reactive to both "a" and "b" state.