In the root component, I am looking to load a different version of state based on a specific 'data' variable.
App.vue:
export default {
store: store,
name: 'app',
data() {
clientId: 1
}
}
store.js:
export const store = new Vuex.Store({
state: {
clientConfig: clientConfig
});
The 'clientConfig' will be stored in a separate file.
What is the most effective approach for dynamically loading the Vuex state based on input provided to the initial Vuejs App?
Thank you!