I wanna create store and named getters, mutations and actions my own name, like:
export const CHANGE_NAME = 'sl/user/changeName';
export const FULLNAME = 'sl/user/fullName';
export const state = {
firstName: 'Roman',
lastName: 'Krasevych'
}
export const getters = {
[FULLNAME]: state => state.firstName + ' ' + state.lastName
};
export const mutations = {
[CHANGE_NAME] (state, newName) {
state.firstName = newName || 'No Name';
}
};
but Nuxt set namespaced=true
by default for modules here:
.nuxt/store.js:52
-> module[name].namespaced = true
I think it isn't a good idea because when I create store like modal
and there add mutation like show
and then add some library like bootstratModal and there are the same store with modal/show
I get a conflict. and therefore I created all store names with some prefix that I generated from my project name, but for that, I should set namespaced=false
, how can I do it?