{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vuex/issues/57","repository_url":"https://api.github.com/repos/vuejs/vuex","labels_url":"https://api.github.com/repos/vuejs/vuex/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vuex/issues/57/comments","events_url":"https://api.github.com/repos/vuejs/vuex/issues/57/events","html_url":"https://github.com/vuejs/vuex/issues/57","id":134092951,"number":57,"title":"State.obj doesn't work","user":{"login":"angelbotto","id":266151,"avatar_url":"https://avatars.githubusercontent.com/u/266151?v=3","gravatar_id":"","url":"https://api.github.com/users/angelbotto","html_url":"https://github.com/angelbotto","followers_url":"https://api.github.com/users/angelbotto/followers","following_url":"https://api.github.com/users/angelbotto/following{/other_user}","gists_url":"https://api.github.com/users/angelbotto/gists{/gist_id}","starred_url":"https://api.github.com/users/angelbotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angelbotto/subscriptions","organizations_url":"https://api.github.com/users/angelbotto/orgs","repos_url":"https://api.github.com/users/angelbotto/repos","events_url":"https://api.github.com/users/angelbotto/events{/privacy}","received_events_url":"https://api.github.com/users/angelbotto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-16T20:48:12Z","updated_at":"2016-02-16T21:28:12Z","closed_at":null,"body":"I tried inside a mutation to to `state.obj = defaultStateBuilder()` that return a fresh object with the initial default state but it doesn't work as the docs say it should. In the end I had to do this:\r\n\r\n```javascript\r\n_.pairs(newState).map((x) => Vue.set(state, x[0], x[1]))\r\n````\r\n\r\nBut I would assume that `state.obj = newState` should work according to the section \"Mutations Follow Vue's Reactivity Rules\" in http://vuex.vuejs.org/en/mutations.html"},"comment":{"url":"https://api.github.com/repos/vuejs/vuex/issues/comments/184881470","html_url":"https://github.com/vuejs/vuex/issues/57#issuecomment-184881470","issue_url":"https://api.github.com/repos/vuejs/vuex/issues/57","id":184881470,"user":{"login":"davidpelaez","id":313232,"avatar_url":"https://avatars.githubusercontent.com/u/313232?v=3","gravatar_id":"","url":"https://api.github.com/users/davidpelaez","html_url":"https://github.com/davidpelaez","followers_url":"https://api.github.com/users/davidpelaez/followers","following_url":"https://api.github.com/users/davidpelaez/following{/other_user}","gists_url":"https://api.github.com/users/davidpelaez/gists{/gist_id}","starred_url":"https://api.github.com/users/davidpelaez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidpelaez/subscriptions","organizations_url":"https://api.github.com/users/davidpelaez/orgs","repos_url":"https://api.github.com/users/davidpelaez/repos","events_url":"https://api.github.com/users/davidpelaez/events{/privacy}","received_events_url":"https://api.github.com/users/davidpelaez/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T21:28:12Z","updated_at":"2016-02-16T21:28:12Z","body":"In this case 'obj' was an example, not a literal pointer to `obj`, right? So it could be `state.myComment`...? There's nothing special about 'obj' then?"}}