Hey there, I'm currently using Nuxt for a CRM tool but encountering an issue with Vuex. When I update the store, it doesn't reflect the changes for all users. My setup involves static deployment on a VPS and communication with a MySQL database via REST API. Additionally, I am utilizing the module mode for Vuex.
For instance, here's how my store is structured:
role/actions.js
export default {
updateProsit: (context, value) => {
context.commit('updateProsit', value)
const equipe = (value % 11) + 1
context.commit('updateEquipe', equipe)
}
}
role/getters.js
export default {
// getters code here...
}
role/mutations.js
export default {
// mutations code here...
}
role/state.js
export default () => ({
// state data here...
})
When updating NumProsit
, it should also update equipe
and subsequently populate currentEquipe
based on the role. This mechanism is working as intended for me but not for other users. I'm unsure whether storing this data in the database or finding a Vuex-specific solution would help resolve this discrepancy.
I may have misunderstood some aspects of Vuex. Appreciate any insights!
Thank you.