michaelolof / vuex-class-component

A Type Safe Vuex Module or Store Using ES6 Classes and ES7 Decorators written in TypeScript.
217 stars 21 forks source link

Namespaced modules use bad action and mutation names #58

Closed guyguy2001 closed 4 years ago

guyguy2001 commented 4 years ago

I'm trying to use actions and mutations inside a namespaced module, but it seems it uses userStore/ in both the module name and the local mutation/action name.

image

image

Reproduction (from which the screenshots are taken): https://github.com/guyguy2001/vuex-class-comp-repro Am I doing something wrong? Or is this a bug?

Velua commented 4 years ago

Are you able to pass params to your actions via $store.dispatch? Just wondering if there's an overlap with a problem I'm facing.

luxaritas commented 4 years ago

This is the same issue as #55

grandmasteralexandr commented 4 years ago

I have the same problem, please fix it

tiagoroldao commented 4 years ago

[Edited to update dependency to latest fixes] I have a PR for this fix up. In the meantime, I've been using my fork of the lib, by targeting a built commit, as such:

// package.lock dependencies
...
"vuex-class-component": "git+https://github.com/tiagoroldao/vuex-class-component.git#f71e27bc4960607081a936c3a756915656af520b",
...
ivangsa commented 4 years ago

I can confirm that linked PR fixed this issue for me.. Thanks @tiagoroldao

LittleFox94 commented 4 years ago

I have the same problem as @guyguy2001 and the linked PR does not seem to help

tiagoroldao commented 4 years ago

@LittleFox94 the branch in my comment is actually outdated, I've since made other fixes:

"vuex-class-component": "git+https://github.com/tiagoroldao/vuex-class-component.git#f71e27bc4960607081a936c3a756915656af520b",

(this is the one currently in pull request #64)

If it doesn't fix your issue, feel free to give details to see what might be up there (potentially on the forked repo, or on the pull request I have up, #64 )

By coincidence, on another issue for this project, someone has just now pointed me to an alternative that might be worth checking out: https://github.com/paleo/direct-vuex