-
-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
newStore and Submodule #258
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #258 +/- ##
==========================================
- Coverage 95.68% 95.51% -0.17%
==========================================
Files 10 11 +1
Lines 139 223 +84
Branches 16 42 +26
==========================================
+ Hits 133 213 +80
- Misses 5 7 +2
- Partials 1 3 +2 ☔ View full report in Codecov by Sentry. |
What is the implication of this? Does it fix the "ERR_ACTION_ACCESS_UNDEFINED" errors?
|
ok this is interesting, but if we go this direction, I can entertain the possibility of a full re-write and do it this way only, and break semver (as in do a breaking change via semver major) |
Those are 2 topics.
const namespacedKey = (actions[key] as any).root ? key : getNamespacedKey(namespace, key)
|
@championswimmer I'm glad to deprecate the old |
I am currently struggling a submodule that is unavailable with the current |
Changes
Vuex
Vuex.{install, Module, Store}
Vuex
asVMD
new VMD.Store
would automatically install$statics
to store$statics
installed$statics
store.getters.$statics
: statics of rootstore.getters.$statics.path.to.submodule
: statics of submodulestore.getters['$statics.path.to.submodule']
: another way to access submodulestore.getters['namespace/of/submodule/$statics/key']
: statics of submodule underlying getters/mutations/actionsnamespace/of/submodule/key
Vue.use(Vuex)
orVue.use(VMD)
$stock
that refers tostore.getters.$statics
for every Vue components@Submodule({module: MySubModule}) sub!: MySubModule
$statics
works for submodulenew VuexModule(module)
toVuexModule.create
VuexModule
is no longer aVuex.Module
(which is confusing)typeof VuexModule
is stillVuex.Module<any, any>
getModule
{root: true}
$statics
not availableShow me code