Donal Spring
2018-06-03 71eec436bdcbb5c86c11929033b6053a986e857b
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
});