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