add vuex store to vue app

This commit is contained in:
2017-02-14 20:44:43 -07:00
parent faee26c586
commit 0b4f1866a9
4 changed files with 23 additions and 3 deletions

View File

@@ -1,7 +1,11 @@
import Vue from 'vue';
import router from './router';
import store from './store';
new Vue({
const app = new Vue({
router,
store,
render: h => h('router-view'),
}).$mount('#app');
});
app.$mount('#app');

11
src/store.js Normal file
View File

@@ -0,0 +1,11 @@
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
const store = new Vuex.Store({
state: {
},
});
export default store;