{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vuex/issues/101","repository_url":"https://api.github.com/repos/vuejs/vuex","labels_url":"https://api.github.com/repos/vuejs/vuex/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vuex/issues/101/comments","events_url":"https://api.github.com/repos/vuejs/vuex/issues/101/events","html_url":"https://github.com/vuejs/vuex/issues/101","id":141237693,"number":101,"title":"the actions is undefined","user":{"login":"funkyLover","id":5418228,"avatar_url":"https://avatars.githubusercontent.com/u/5418228?v=3","gravatar_id":"","url":"https://api.github.com/users/funkyLover","html_url":"https://github.com/funkyLover","followers_url":"https://api.github.com/users/funkyLover/followers","following_url":"https://api.github.com/users/funkyLover/following{/other_user}","gists_url":"https://api.github.com/users/funkyLover/gists{/gist_id}","starred_url":"https://api.github.com/users/funkyLover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/funkyLover/subscriptions","organizations_url":"https://api.github.com/users/funkyLover/orgs","repos_url":"https://api.github.com/users/funkyLover/repos","events_url":"https://api.github.com/users/funkyLover/events{/privacy}","received_events_url":"https://api.github.com/users/funkyLover/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-16T10:59:25Z","updated_at":"2016-03-16T11:10:24Z","closed_at":null,"body":"I use `vuex-router-sync` with `vuex` and `vue-router`\r\nbut something is weird, i get an erro notify the actions is undefined\r\n`store/index.js`\r\n```js\r\nimport Vuex from 'vuex'\r\nimport Vue from 'vue'\r\n\r\nVue.use(Vuex)\r\n\r\nconst store = new Vuex.Store({\r\n  state: {\r\n    count: 1\r\n  },\r\n  mutations: {\r\n    INCREMENT (state, x) {\r\n      state.count += x\r\n    }\r\n  },\r\n  actions: {\r\n    increment: 'INCREMENT'\r\n  }\r\n})\r\n\r\nexport default store\r\n```\r\n`main.js`\r\n```js\r\nimport Vue from 'vue'\r\nimport App from './App'\r\nimport { sync } from 'vuex-router-sync'\r\nimport store from './store/index'\r\nimport router from './router/index'\r\n\r\nVue.config.debug = true\r\n// before sync, store do not contain the actions\r\nconsole.log(store.actions)  // -> undefined\r\nsync(store, router)\r\n// after sync, store also do not contain the actions\r\nconsole.log(store.actions) // -> undefined\r\n\r\nrouter.start(App, '#app')\r\n\r\n```\r\nwhen i use within a vue component\r\n```js\r\n<template>\r\n  <div class=\"about\">\r\n    <h1>{{ msg }}</h1>\r\n  </div>\r\n</template>\r\n\r\n<script>\r\nimport store from '../store/index'\r\n\r\nexport default {\r\n  data () {\r\n    return {\r\n      msg: 'Hello World!'\r\n    }\r\n  },\r\n  computed: {\r\n    msg: function () {\r\n      // bug? the store object not contain the actions\r\n      // store.actions.increment(1) -> error\r\n      // console.log(store.actions) -> undefine\r\n      store.dispatch('INCREMENT', 1) // work fine\r\n      return 'hello' + store.state.route.path + store.state.count\r\n    }\r\n  }\r\n}\r\n</script>\r\n```\r\nis there a bug ? or I make a mistake??\r\n"},"comment":{"url":"https://api.github.com/repos/vuejs/vuex/issues/comments/197264690","html_url":"https://github.com/vuejs/vuex/issues/101#issuecomment-197264690","issue_url":"https://api.github.com/repos/vuejs/vuex/issues/101","id":197264690,"user":{"login":"jonagoldman","id":1297559,"avatar_url":"https://avatars.githubusercontent.com/u/1297559?v=3","gravatar_id":"","url":"https://api.github.com/users/jonagoldman","html_url":"https://github.com/jonagoldman","followers_url":"https://api.github.com/users/jonagoldman/followers","following_url":"https://api.github.com/users/jonagoldman/following{/other_user}","gists_url":"https://api.github.com/users/jonagoldman/gists{/gist_id}","starred_url":"https://api.github.com/users/jonagoldman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonagoldman/subscriptions","organizations_url":"https://api.github.com/users/jonagoldman/orgs","repos_url":"https://api.github.com/users/jonagoldman/repos","events_url":"https://api.github.com/users/jonagoldman/events{/privacy}","received_events_url":"https://api.github.com/users/jonagoldman/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T11:10:24Z","updated_at":"2016-03-16T11:10:24Z","body":"You are using an old version of Vuex. Take a look at the breaking changes."}}