Answer the question
In order to leave comments, you need to log in
How to write multiple vuex objects into one?
// store1.js
const store1 = {
state: {},
getters: {},
mutations: {},
actions: {},
};
export default store1
// store2.js
const store2 = {
state: {},
getters: {},
mutations: {},
actions: {},
};
export default store2
//store_index.js
import store1 from './store1'
import store2 from './store2'
const store = new Vuex.Store('Поместить store1 и store2 сюда');
//const store = new Vuex.Store(store1, store2); Такой вариант не работает
Answer the question
In order to leave comments, you need to log in
I advise you to read this article:
https://vuex.vuejs.org/ru/guide/modules.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question