{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/3561","labels_url":"https://api.github.com/repos/meteor/meteor/issues/3561/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/3561/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/3561/events","html_url":"https://github.com/meteor/meteor/pull/3561","id":55545024,"number":3561,"title":"Local reactive template state","user":{"login":"stubailo","id":448783,"avatar_url":"https://avatars.githubusercontent.com/u/448783?v=3","gravatar_id":"","url":"https://api.github.com/users/stubailo","html_url":"https://github.com/stubailo","followers_url":"https://api.github.com/users/stubailo/followers","following_url":"https://api.github.com/users/stubailo/following{/other_user}","gists_url":"https://api.github.com/users/stubailo/gists{/gist_id}","starred_url":"https://api.github.com/users/stubailo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stubailo/subscriptions","organizations_url":"https://api.github.com/users/stubailo/orgs","repos_url":"https://api.github.com/users/stubailo/repos","events_url":"https://api.github.com/users/stubailo/events{/privacy}","received_events_url":"https://api.github.com/users/stubailo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meteor/meteor/labels/Project:Blaze","name":"Project:Blaze","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-01-26T22:10:36Z","updated_at":"2015-02-13T23:54:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/meteor/meteor/pulls/3561","html_url":"https://github.com/meteor/meteor/pull/3561","diff_url":"https://github.com/meteor/meteor/pull/3561.diff","patch_url":"https://github.com/meteor/meteor/pull/3561.patch"},"body":"You can now use `Template.instance().state` to store local reactive data for your template. There is also a `Template.state` built-in helper that you can use to access it without defining a new helper.\r\n\r\nto do:\r\n1. Add serialization hooks for migration\r\n2. Refactor reactive dict to not always serialize things"},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/74348191","html_url":"https://github.com/meteor/meteor/pull/3561#issuecomment-74348191","issue_url":"https://api.github.com/repos/meteor/meteor/issues/3561","id":74348191,"user":{"login":"stubailo","id":448783,"avatar_url":"https://avatars.githubusercontent.com/u/448783?v=3","gravatar_id":"","url":"https://api.github.com/users/stubailo","html_url":"https://github.com/stubailo","followers_url":"https://api.github.com/users/stubailo/followers","following_url":"https://api.github.com/users/stubailo/following{/other_user}","gists_url":"https://api.github.com/users/stubailo/gists{/gist_id}","starred_url":"https://api.github.com/users/stubailo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stubailo/subscriptions","organizations_url":"https://api.github.com/users/stubailo/orgs","repos_url":"https://api.github.com/users/stubailo/repos","events_url":"https://api.github.com/users/stubailo/events{/privacy}","received_events_url":"https://api.github.com/users/stubailo/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T23:54:48Z","updated_at":"2015-02-13T23:54:48Z","body":"@dburles personally I agree with you that `state` is more specific. I'm not really sure that `vars` is less jargon-y, especially since they are really just dictionary keys and not variables in their own right. I think it's right that we can just say \"`this.state` is a reactive dictionary where templates can keep any local UI state, for example the current tab open or the state of a dropdown menu.\"\r\n\r\nI wonder who we could ask to actually find out which one is better. React calls this thing state, so maybe it's better to be less confusing by using a similar word for a similar thing. @debergalis what do you think?"}}