{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vuex/issues/344","repository_url":"https://api.github.com/repos/vuejs/vuex","labels_url":"https://api.github.com/repos/vuejs/vuex/issues/344/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vuex/issues/344/comments","events_url":"https://api.github.com/repos/vuejs/vuex/issues/344/events","html_url":"https://github.com/vuejs/vuex/issues/344","id":179403261,"node_id":"MDU6SXNzdWUxNzk0MDMyNjE=","number":344,"title":"How do you get rootState in mutation from modules?","user":{"login":"zipme","id":9434,"node_id":"MDQ6VXNlcjk0MzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/9434?v=4","gravatar_id":"","url":"https://api.github.com/users/zipme","html_url":"https://github.com/zipme","followers_url":"https://api.github.com/users/zipme/followers","following_url":"https://api.github.com/users/zipme/following{/other_user}","gists_url":"https://api.github.com/users/zipme/gists{/gist_id}","starred_url":"https://api.github.com/users/zipme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zipme/subscriptions","organizations_url":"https://api.github.com/users/zipme/orgs","repos_url":"https://api.github.com/users/zipme/repos","events_url":"https://api.github.com/users/zipme/events{/privacy}","received_events_url":"https://api.github.com/users/zipme/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2016-09-27T05:53:43Z","updated_at":"2018-11-21T07:13:15Z","closed_at":"2016-09-27T07:14:37Z","author_association":"NONE","body":"Hi, \n\nI am currently using `vuex 2.0.0-rc.6` and trying to get the rootState in a mutation method from within a module, like so:\n\n``` javascript\n  const moduleA = {\n    state: { count: 0 },\n    mutations: {\n      increment: (state, rootStatem, { by }) {\n        // state is the local module state\n        state.count = state.count + by\n\n        // rootState is undefined\n      }\n    },\n ...\n```\n\nand then `store.commit('increment', {by: 2})`\n\nAs you can see the rootState is undefined. Any idea why this happened? I am referring the code from http://vuex.vuejs.org/en/modules.html\n"},"comment":{"url":"https://api.github.com/repos/vuejs/vuex/issues/comments/440561134","html_url":"https://github.com/vuejs/vuex/issues/344#issuecomment-440561134","issue_url":"https://api.github.com/repos/vuejs/vuex/issues/344","id":440561134,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDU2MTEzNA==","user":{"login":"jeduden","id":1117699,"node_id":"MDQ6VXNlcjExMTc2OTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1117699?v=4","gravatar_id":"","url":"https://api.github.com/users/jeduden","html_url":"https://github.com/jeduden","followers_url":"https://api.github.com/users/jeduden/followers","following_url":"https://api.github.com/users/jeduden/following{/other_user}","gists_url":"https://api.github.com/users/jeduden/gists{/gist_id}","starred_url":"https://api.github.com/users/jeduden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeduden/subscriptions","organizations_url":"https://api.github.com/users/jeduden/orgs","repos_url":"https://api.github.com/users/jeduden/repos","events_url":"https://api.github.com/users/jeduden/events{/privacy}","received_events_url":"https://api.github.com/users/jeduden/received_events","type":"User","site_admin":false},"created_at":"2018-11-21T07:13:15Z","updated_at":"2018-11-21T07:13:15Z","author_association":"NONE","body":"@hawkeye64 if you use the data in multiple spots. have you considered to store the data in one place and use getters in the different places that depend on it ?"}}
{"actor":{"display_login":"jeduden"}}