1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| import Vue from "vue";
| import Vuex from "vuex";
| import mutations from "./mutations";
| import actions from "./actions";
|
| Vue.use(Vuex);
|
| export default new Vuex.Store({
| state: {
| loading: true,
| todos: [],
| newTodo: ""
| },
| getters: {
| newTodo: state => state.newTodo,
| todos: state => state.todos
| },
| mutations: mutations,
| actions: actions
| });
|
|