{"action":"created","comment":{"url":"https://api.github.com/repos/vuejs/vuex/pulls/comments/57064357","id":57064357,"diff_hunk":"@@ -231,23 +246,21 @@ export default {\n \n There's a new object `vuex.getters` which requests `counterValue` to be bound to the getter `getCount`. We've chosen different names to demonstrate that you can use the names that make sense in the context of your component, not necessarily the getter name itself.\n \n-You might be wondering, why is it preferable to use a getter instead of using something like `store.state.count` (which doesn't work, but still). While it would be ok here, in a large app:\n+You might be wondering - why did we choose to use a getter instead of directly accessing the value from the state. This concept is more of a best practice, and is more applicable to a larger app, which presents several distinct advantages:\n \n-1. A value may be derived from many other value (think totals, averages, etc.).\n-2. Many components can use the same getter function.\n+1. We may want to define getters with computed values (think totals, averages, etc.).\n+2. Many components in a larger app can use the same getter function.\n 3. If the value is moved from say `store.count` to `store.counter.value` you'd have to update one getter instead of dozens of components.\n ","path":"docs/en/tutorial.md","position":188,"original_position":188,"commit_id":"d5737d2027ceee27af5a93f96be247c6d42dac99","original_commit_id":"d5737d2027ceee27af5a93f96be247c6d42dac99","user":{"login":"yyx990803","id":499550,"avatar_url":"https://avatars.githubusercontent.com/u/499550?v=3","gravatar_id":"","url":"https://api.github.com/users/yyx990803","html_url":"https://github.com/yyx990803","followers_url":"https://api.github.com/users/yyx990803/followers","following_url":"https://api.github.com/users/yyx990803/following{/other_user}","gists_url":"https://api.github.com/users/yyx990803/gists{/gist_id}","starred_url":"https://api.github.com/users/yyx990803/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyx990803/subscriptions","organizations_url":"https://api.github.com/users/yyx990803/orgs","repos_url":"https://api.github.com/users/yyx990803/repos","events_url":"https://api.github.com/users/yyx990803/events{/privacy}","received_events_url":"https://api.github.com/users/yyx990803/received_events","type":"User","site_admin":false},"body":"we can also mention that getters are efficiently cached for performance (e.g. used by 100 components, but evaluated only once)","created_at":"2016-03-22T20:37:29Z","updated_at":"2016-03-22T20:37:29Z","html_url":"https://github.com/vuejs/vuex/pull/111#discussion_r57064357","pull_request_url":"https://api.github.com/repos/vuejs/vuex/pulls/111","_links":{"self":{"href":"https://api.github.com/repos/vuejs/vuex/pulls/comments/57064357"},"html":{"href":"https://github.com/vuejs/vuex/pull/111#discussion_r57064357"},"pull_request":{"href":"https://api.github.com/repos/vuejs/vuex/pulls/111"}}},"pull_request":{"url":"https://api.github.com/repos/vuejs/vuex/pulls/111","id":63679452,"html_url":"https://github.com/vuejs/vuex/pull/111","diff_url":"https://github.com/vuejs/vuex/pull/111.diff","patch_url":"https://github.com/vuejs/vuex/pull/111.patch","issue_url":"https://api.github.com/repos/vuejs/vuex/issues/111","number":111,"state":"open","locked":false,"title":"Vuex Tutorial","user":{"login":"skyronic","id":80173,"avatar_url":"https://avatars.githubusercontent.com/u/80173?v=3","gravatar_id":"","url":"https://api.github.com/users/skyronic","html_url":"https://github.com/skyronic","followers_url":"https://api.github.com/users/skyronic/followers","following_url":"https://api.github.com/users/skyronic/following{/other_user}","gists_url":"https://api.github.com/users/skyronic/gists{/gist_id}","starred_url":"https://api.github.com/users/skyronic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyronic/subscriptions","organizations_url":"https://api.github.com/users/skyronic/orgs","repos_url":"https://api.github.com/users/skyronic/repos","events_url":"https://api.github.com/users/skyronic/events{/privacy}","received_events_url":"https://api.github.com/users/skyronic/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-22T07:28:44Z","updated_at":"2016-03-22T20:37:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af17174ca935064b1698840f14ae412b0d2a9d0b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vuejs/vuex/pulls/111/commits","review_comments_url":"https://api.github.com/repos/vuejs/vuex/pulls/111/comments","review_comment_url":"https://api.github.com/repos/vuejs/vuex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vuejs/vuex/issues/111/comments","statuses_url":"https://api.github.com/repos/vuejs/vuex/statuses/d5737d2027ceee27af5a93f96be247c6d42dac99","head":{"label":"skyronic:tutorial","ref":"tutorial","sha":"d5737d2027ceee27af5a93f96be247c6d42dac99","user":{"login":"skyronic","id":80173,"avatar_url":"https://avatars.githubusercontent.com/u/80173?v=3","gravatar_id":"","url":"https://api.github.com/users/skyronic","html_url":"https://github.com/skyronic","followers_url":"https://api.github.com/users/skyronic/followers","following_url":"https://api.github.com/users/skyronic/following{/other_user}","gists_url":"https://api.github.com/users/skyronic/gists{/gist_id}","starred_url":"https://api.github.com/users/skyronic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyronic/subscriptions","organizations_url":"https://api.github.com/users/skyronic/orgs","repos_url":"https://api.github.com/users/skyronic/repos","events_url":"https://api.github.com/users/skyronic/events{/privacy}","received_events_url":"https://api.github.com/users/skyronic/received_events","type":"User","site_admin":false},"repo":{"id":53782316,"name":"vuex","full_name":"skyronic/vuex","owner":{"login":"skyronic","id":80173,"avatar_url":"https://avatars.githubusercontent.com/u/80173?v=3","gravatar_id":"","url":"https://api.github.com/users/skyronic","html_url":"https://github.com/skyronic","followers_url":"https://api.github.com/users/skyronic/followers","following_url":"https://api.github.com/users/skyronic/following{/other_user}","gists_url":"https://api.github.com/users/skyronic/gists{/gist_id}","starred_url":"https://api.github.com/users/skyronic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyronic/subscriptions","organizations_url":"https://api.github.com/users/skyronic/orgs","repos_url":"https://api.github.com/users/skyronic/repos","events_url":"https://api.github.com/users/skyronic/events{/privacy}","received_events_url":"https://api.github.com/users/skyronic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skyronic/vuex","description":"Flux-inspired Application Architecture for Vue.js.","fork":true,"url":"https://api.github.com/repos/skyronic/vuex","forks_url":"https://api.github.com/repos/skyronic/vuex/forks","keys_url":"https://api.github.com/repos/skyronic/vuex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skyronic/vuex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skyronic/vuex/teams","hooks_url":"https://api.github.com/repos/skyronic/vuex/hooks","issue_events_url":"https://api.github.com/repos/skyronic/vuex/issues/events{/number}","events_url":"https://api.github.com/repos/skyronic/vuex/events","assignees_url":"https://api.github.com/repos/skyronic/vuex/assignees{/user}","branches_url":"https://api.github.com/repos/skyronic/vuex/branches{/branch}","tags_url":"https://api.github.com/repos/skyronic/vuex/tags","blobs_url":"https://api.github.com/repos/skyronic/vuex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skyronic/vuex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skyronic/vuex/git/refs{/sha}","trees_url":"https://api.github.com/repos/skyronic/vuex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skyronic/vuex/statuses/{sha}","languages_url":"https://api.github.com/repos/skyronic/vuex/languages","stargazers_url":"https://api.github.com/repos/skyronic/vuex/stargazers","contributors_url":"https://api.github.com/repos/skyronic/vuex/contributors","subscribers_url":"https://api.github.com/repos/skyronic/vuex/subscribers","subscription_url":"https://api.github.com/repos/skyronic/vuex/subscription","commits_url":"https://api.github.com/repos/skyronic/vuex/commits{/sha}","git_commits_url":"https://api.github.com/repos/skyronic/vuex/git/commits{/sha}","comments_url":"https://api.github.com/repos/skyronic/vuex/comments{/number}","issue_comment_url":"https://api.github.com/repos/skyronic/vuex/issues/comments{/number}","contents_url":"https://api.github.com/repos/skyronic/vuex/contents/{+path}","compare_url":"https://api.github.com/repos/skyronic/vuex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skyronic/vuex/merges","archive_url":"https://api.github.com/repos/skyronic/vuex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skyronic/vuex/downloads","issues_url":"https://api.github.com/repos/skyronic/vuex/issues{/number}","pulls_url":"https://api.github.com/repos/skyronic/vuex/pulls{/number}","milestones_url":"https://api.github.com/repos/skyronic/vuex/milestones{/number}","notifications_url":"https://api.github.com/repos/skyronic/vuex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skyronic/vuex/labels{/name}","releases_url":"https://api.github.com/repos/skyronic/vuex/releases{/id}","deployments_url":"https://api.github.com/repos/skyronic/vuex/deployments","created_at":"2016-03-13T11:48:51Z","updated_at":"2016-03-13T11:48:51Z","pushed_at":"2016-03-22T10:47:22Z","git_url":"git://github.com/skyronic/vuex.git","ssh_url":"git@github.com:skyronic/vuex.git","clone_url":"https://github.com/skyronic/vuex.git","svn_url":"https://github.com/skyronic/vuex","homepage":"","size":6491,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vuejs:master","ref":"master","sha":"082e319c74a97d30c06d4367bce33164d5008dae","user":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars.githubusercontent.com/u/6128107?v=3","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"repo":{"id":39176269,"name":"vuex","full_name":"vuejs/vuex","owner":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars.githubusercontent.com/u/6128107?v=3","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vuejs/vuex","description":"Flux-inspired Application Architecture for Vue.js.","fork":false,"url":"https://api.github.com/repos/vuejs/vuex","forks_url":"https://api.github.com/repos/vuejs/vuex/forks","keys_url":"https://api.github.com/repos/vuejs/vuex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vuejs/vuex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vuejs/vuex/teams","hooks_url":"https://api.github.com/repos/vuejs/vuex/hooks","issue_events_url":"https://api.github.com/repos/vuejs/vuex/issues/events{/number}","events_url":"https://api.github.com/repos/vuejs/vuex/events","assignees_url":"https://api.github.com/repos/vuejs/vuex/assignees{/user}","branches_url":"https://api.github.com/repos/vuejs/vuex/branches{/branch}","tags_url":"https://api.github.com/repos/vuejs/vuex/tags","blobs_url":"https://api.github.com/repos/vuejs/vuex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vuejs/vuex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vuejs/vuex/git/refs{/sha}","trees_url":"https://api.github.com/repos/vuejs/vuex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vuejs/vuex/statuses/{sha}","languages_url":"https://api.github.com/repos/vuejs/vuex/languages","stargazers_url":"https://api.github.com/repos/vuejs/vuex/stargazers","contributors_url":"https://api.github.com/repos/vuejs/vuex/contributors","subscribers_url":"https://api.github.com/repos/vuejs/vuex/subscribers","subscription_url":"https://api.github.com/repos/vuejs/vuex/subscription","commits_url":"https://api.github.com/repos/vuejs/vuex/commits{/sha}","git_commits_url":"https://api.github.com/repos/vuejs/vuex/git/commits{/sha}","comments_url":"https://api.github.com/repos/vuejs/vuex/comments{/number}","issue_comment_url":"https://api.github.com/repos/vuejs/vuex/issues/comments{/number}","contents_url":"https://api.github.com/repos/vuejs/vuex/contents/{+path}","compare_url":"https://api.github.com/repos/vuejs/vuex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vuejs/vuex/merges","archive_url":"https://api.github.com/repos/vuejs/vuex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vuejs/vuex/downloads","issues_url":"https://api.github.com/repos/vuejs/vuex/issues{/number}","pulls_url":"https://api.github.com/repos/vuejs/vuex/pulls{/number}","milestones_url":"https://api.github.com/repos/vuejs/vuex/milestones{/number}","notifications_url":"https://api.github.com/repos/vuejs/vuex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vuejs/vuex/labels{/name}","releases_url":"https://api.github.com/repos/vuejs/vuex/releases{/id}","deployments_url":"https://api.github.com/repos/vuejs/vuex/deployments","created_at":"2015-07-16T04:21:26Z","updated_at":"2016-03-22T18:50:49Z","pushed_at":"2016-03-22T10:49:35Z","git_url":"git://github.com/vuejs/vuex.git","ssh_url":"git@github.com:vuejs/vuex.git","clone_url":"https://github.com/vuejs/vuex.git","svn_url":"https://github.com/vuejs/vuex","homepage":"","size":5846,"stargazers_count":890,"watchers_count":890,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":95,"mirror_url":null,"open_issues_count":11,"forks":95,"open_issues":11,"watchers":890,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vuejs/vuex/pulls/111"},"html":{"href":"https://github.com/vuejs/vuex/pull/111"},"issue":{"href":"https://api.github.com/repos/vuejs/vuex/issues/111"},"comments":{"href":"https://api.github.com/repos/vuejs/vuex/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/vuejs/vuex/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/vuejs/vuex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vuejs/vuex/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/vuejs/vuex/statuses/d5737d2027ceee27af5a93f96be247c6d42dac99"}}}}