{"action":"closed","issue":{"url":"https://api.github.com/repos/goatslacker/alt/issues/310","labels_url":"https://api.github.com/repos/goatslacker/alt/issues/310/labels{/name}","comments_url":"https://api.github.com/repos/goatslacker/alt/issues/310/comments","events_url":"https://api.github.com/repos/goatslacker/alt/issues/310/events","html_url":"https://github.com/goatslacker/alt/issues/310","id":86254360,"number":310,"title":"getState setState","user":{"login":"TeckniX","id":33699,"avatar_url":"https://avatars.githubusercontent.com/u/33699?v=3","gravatar_id":"","url":"https://api.github.com/users/TeckniX","html_url":"https://github.com/TeckniX","followers_url":"https://api.github.com/users/TeckniX/followers","following_url":"https://api.github.com/users/TeckniX/following{/other_user}","gists_url":"https://api.github.com/users/TeckniX/gists{/gist_id}","starred_url":"https://api.github.com/users/TeckniX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeckniX/subscriptions","organizations_url":"https://api.github.com/users/TeckniX/orgs","repos_url":"https://api.github.com/users/TeckniX/repos","events_url":"https://api.github.com/users/TeckniX/events{/privacy}","received_events_url":"https://api.github.com/users/TeckniX/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-08T16:55:45Z","updated_at":"2015-06-08T22:28:03Z","closed_at":"2015-06-08T22:28:03Z","body":"From the doc, it's a bit weird that the instance has to be retrieved to get the state, but this doesn't matter when setting the state?\r\nFrom docs `getState`:\r\n```js\r\nclass MyStore {\r\n  handleFoo() {\r\n\r\n    setTimeout(() => {\r\n      // get state of store instance.\r\n      let state = this.getInstance().getState();\r\n    }, 100);\r\n\r\n    // supress emitting a change.\r\n    return false;\r\n  }\r\n}\r\n```\r\nFrom docs `setState`:\r\n```js\r\nclass MyStore {\r\n  handleFoo() {\r\n    this.foo = 0;\r\n\r\n    setTimeout(() => {\r\n      // set foo to 1 and emit a change.\r\n      this.setState({\r\n        foo: 1\r\n      });\r\n    }, 100);\r\n\r\n    // supress emitting a change.\r\n    return false;\r\n  }\r\n}\r\n```\r\nit would be nice if both of them just used: `this.getState()` and `this.setState()`"}}