Open
Description
What problem does this feature solve?
This feature adds the ability to retrieve the store module context directly from root store instance.
What does the proposed API look like?
Let's suppose, that store
variable is my Vuex (root) store instance.
I solve this problem with the following code:
let subModuleContext = store._modulesNamespaceMap['subModuleName/'].context
It would be nice to write
let subModuleContext = store.getContext('subModuleName')
Then, I can write subModuleContext.dispatch('someAction')
instead of store.dispatch('subModuleName/someAction')