championswimmer / vuex-module-decorators

TypeScript/ES7 Decorators to create Vuex modules declaratively
https://championswimmer.in/vuex-module-decorators/
MIT License
1.8k stars 170 forks source link

In vuex4 version, the data returned by Getter is not responsive. #365

Open atom-7 opened 3 years ago

atom-7 commented 3 years ago

When I use Get to create a Getter, for use in the page, the value of the repository has changed, but the value of the page does not change accordingly.

"vue": "^3.0.5" "vuex": "^4.0.0-0", "vuex-module-decorators": "^1.0.1",

here is store code image here is Page Code image

The formState.coverDoamin doesn't change, When i update the Store's data , But it will have no problem if I use computed. image

How could I make it work without use Computed API

alecgibson commented 1 year ago

We're running into exactly this issue. This worked fine in vuex@3, but doesn't work in vuex@4

alecgibson commented 1 year ago

Okay actually after doing some more digging/reading, our issue is actually an upstream vuex issue where registering a dynamic module breaks reactivity