Skip to content

Commit

Permalink
Add Vuex
Browse files Browse the repository at this point in the history
  • Loading branch information
phildarnowsky committed Dec 16, 2019
1 parent 469d8c1 commit 69a4a70
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions p4/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion p4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"axios": "^0.19.0",
"core-js": "^3.3.2",
"vue": "^2.6.10",
"vue-router": "^3.1.3"
"vue-router": "^3.1.3",
"vuex": "^3.1.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.0.0",
Expand Down
7 changes: 6 additions & 1 deletion p4/src/main.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Vuex from 'vuex'
import App from './App.vue'
import DeckPage from './pages/DeckPage.vue'
import HomePage from './pages/HomePage.vue'
import StatsPage from './pages/StatsPage.vue'

Vue.config.productionTip = false
Vue.use(VueRouter)
Vue.use(Vuex)

const routes = [
{ path: '/', name: "home", component: HomePage },
Expand All @@ -19,7 +21,10 @@ const router = new VueRouter({
mode: 'history'
})

const store = new Vuex.Store()

new Vue({
render: h => h(App),
router: router
router: router,
store
}).$mount('#app')

0 comments on commit 69a4a70

Please sign in to comment.