{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue/issues/5982","repository_url":"https://api.github.com/repos/vuejs/vue","labels_url":"https://api.github.com/repos/vuejs/vue/issues/5982/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue/issues/5982/comments","events_url":"https://api.github.com/repos/vuejs/vue/issues/5982/events","html_url":"https://github.com/vuejs/vue/issues/5982","id":238678334,"number":5982,"title":"Computed property is not updating in SSR","user":{"login":"mrTimofey","id":7373909,"avatar_url":"https://avatars0.githubusercontent.com/u/7373909?v=3","gravatar_id":"","url":"https://api.github.com/users/mrTimofey","html_url":"https://github.com/mrTimofey","followers_url":"https://api.github.com/users/mrTimofey/followers","following_url":"https://api.github.com/users/mrTimofey/following{/other_user}","gists_url":"https://api.github.com/users/mrTimofey/gists{/gist_id}","starred_url":"https://api.github.com/users/mrTimofey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrTimofey/subscriptions","organizations_url":"https://api.github.com/users/mrTimofey/orgs","repos_url":"https://api.github.com/users/mrTimofey/repos","events_url":"https://api.github.com/users/mrTimofey/events{/privacy}","received_events_url":"https://api.github.com/users/mrTimofey/received_events","type":"User","site_admin":false},"labels":[{"id":79873474,"url":"https://api.github.com/repos/vuejs/vue/labels/need%20repro","name":"need repro","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-26T21:42:42Z","updated_at":"2017-06-27T10:05:35Z","closed_at":null,"body":"### Version\r\n2.3.4\r\n\r\n### Reproduction link\r\n[https://jsfiddle.net/chrisvfritz/50wL7mdz/](https://jsfiddle.net/chrisvfritz/50wL7mdz/)\r\n\r\n### Steps to reproduce\r\n1. Create any `component.data` item.\r\n2. Create any computed property which depends on this data item.\r\n3. Create `created` hook with the following actions:\r\n    1. Access the computed value.\r\n    2. Change the data item to anything else.\r\n    3. Print computed value somewhere (`console.log` for example).\r\n\r\n### What is expected?\r\nComputed prop value must be changed.\r\n\r\n### What is actually happening?\r\nComputed prop value remains unchanged in SSR.\r\n\r\n---\r\nI have created a watcher on `$route.query.key` value with `immediate: true` flag. I compare old computed value with new one (after some actions affecting the computed prop) and see the error 'SSR and client side DOM's are different'. After some debugging I found out that computed property is simply not changing after first call in SSR.\r\nMay be this behavior is normal but i don't remember something like that was in the documentation.\r\n\r\n<!-- generated by vue-issues. DO NOT REMOVE -->"},"comment":{"url":"https://api.github.com/repos/vuejs/vue/issues/comments/311313544","html_url":"https://github.com/vuejs/vue/issues/5982#issuecomment-311313544","issue_url":"https://api.github.com/repos/vuejs/vue/issues/5982","id":311313544,"user":{"login":"mrTimofey","id":7373909,"avatar_url":"https://avatars0.githubusercontent.com/u/7373909?v=3","gravatar_id":"","url":"https://api.github.com/users/mrTimofey","html_url":"https://github.com/mrTimofey","followers_url":"https://api.github.com/users/mrTimofey/followers","following_url":"https://api.github.com/users/mrTimofey/following{/other_user}","gists_url":"https://api.github.com/users/mrTimofey/gists{/gist_id}","starred_url":"https://api.github.com/users/mrTimofey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrTimofey/subscriptions","organizations_url":"https://api.github.com/users/mrTimofey/orgs","repos_url":"https://api.github.com/users/mrTimofey/repos","events_url":"https://api.github.com/users/mrTimofey/events{/privacy}","received_events_url":"https://api.github.com/users/mrTimofey/received_events","type":"User","site_admin":false},"created_at":"2017-06-27T10:05:35Z","updated_at":"2017-06-27T10:05:35Z","body":"I have created a branch in my repo with the reproduction code.\r\nhttps://github.com/mrTimofey/vue-ssr-starter/tree/vue-ssr-computed-bug\r\n\r\n### Steps to reproduce\r\n1. `npm run dev` (or `npm build`, `npm start` in production mode)\r\n2. open http://localhost:8080\r\n3. compare server and browser consoles\r\n\r\nThe reproduction code itself is in the `src/app.vue` component."}}
{"actor":{"display_login":"mrTimofey"}}