1๐
โ
I have a spell mistake, instead of toggleSidebar I wrote toggleSibebar. After the correction the code work as suposse.
Here is the code:
export const state = () => ({
toggleSidebar: false,
})
export const mutations = {
TOGGLE_SIDEBAR(state) {
state.toggleSidebar = !state.toggleSidebar
},
}
export const actions = {
toggleSidebar({ commit }) {
commit('TOGGLE_SIDEBAR')
},
}
export const getters = {
toggleSidebar: (state) => state.toggleSidebar,
}
Implementing ESlint on my project was also the solution.
๐คAldrin Cuvi
Source:stackexchange.com