Moved my project from single module in vuex store to multiple following the documentation.
It states that the specific module should be accessed like so:
store.state.a // -> `moduleA`'s state
This is when accessing the state of a module. It fails to say how to access getters and mutations as well as the commands like 'commit' and 'replaceState' for a specific module so I made my own conclusion:
store.getters.a
store.mutations.a
store.a.commit()
store.a.replaceState()
1) Are those conclusions correct?
2) Using these I get a really general error message:
TypeError: rawModule is undefined
Here is my store.js:
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
modules: {
listingModule: listingModule,
openListingsOnDashModule: listingsOnDashModule,
closedListingsOnDashModule: listingsOnDashModule
}
})
const listingsOnDashModule = {...}
const listingModule = {...}
// their content hasn't changes since the single module approach.