There is such code in the VUEX repository:
export const state = () => ({
z: 'sdfjkhskldjfhjskjdhfksjdhf',
});
export const mutations = {
init_data_for_firmenistorie2 (state, uploadDbFirmenistorieData){
state.z = uploadDbFirmenistorieData;
},
};
async nuxtServerInit ({commit}) {
console.log('111');
commit('init_data_for_firmenistorie2', 123)
}
}
My question is:
How should I call to nuxtServerInit in such a way that I can use it to rewrite the value of state z?
P.S. Right now my code is not working.