{"action":"created","issue":{"url":"https://api.github.com/repos/kenwheeler/mcfly/issues/35","labels_url":"https://api.github.com/repos/kenwheeler/mcfly/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/kenwheeler/mcfly/issues/35/comments","events_url":"https://api.github.com/repos/kenwheeler/mcfly/issues/35/events","html_url":"https://github.com/kenwheeler/mcfly/pull/35","id":57676264,"number":35,"title":"Remove 'return true;'s from dispatcher callbacks","user":{"login":"zgotsch","id":693087,"avatar_url":"https://avatars.githubusercontent.com/u/693087?v=3","gravatar_id":"","url":"https://api.github.com/users/zgotsch","html_url":"https://github.com/zgotsch","followers_url":"https://api.github.com/users/zgotsch/followers","following_url":"https://api.github.com/users/zgotsch/following{/other_user}","gists_url":"https://api.github.com/users/zgotsch/gists{/gist_id}","starred_url":"https://api.github.com/users/zgotsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zgotsch/subscriptions","organizations_url":"https://api.github.com/users/zgotsch/orgs","repos_url":"https://api.github.com/users/zgotsch/repos","events_url":"https://api.github.com/users/zgotsch/events{/privacy}","received_events_url":"https://api.github.com/users/zgotsch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-14T01:50:19Z","updated_at":"2015-02-16T02:13:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kenwheeler/mcfly/pulls/35","html_url":"https://github.com/kenwheeler/mcfly/pull/35","diff_url":"https://github.com/kenwheeler/mcfly/pull/35.diff","patch_url":"https://github.com/kenwheeler/mcfly/pull/35.patch"},"body":"The dispatcher released by Facebook no longer uses promises and doesn't use the return value of registered stores' dispatcher callbacks.\r\n\r\nSee https://github.com/facebook/flux/blob/master/src/Dispatcher.js#L217 and https://github.com/facebook/flux/blob/master/examples/flux-chat/js/stores/MessageStore.js#L96-127 for some Facebook evidence that this is no longer necessary (unfortunately they haven't been keeping the flux tutorial up-to-date).\r\n\r\nI favor single exit points for functions when it's not too much trouble, so I added a needsUpdate variable to keep track of whether the store should emit change. Alternatively, the emitChange() calls could be moved up into the case statements or you could simply return in the default."},"comment":{"url":"https://api.github.com/repos/kenwheeler/mcfly/issues/comments/74451476","html_url":"https://github.com/kenwheeler/mcfly/pull/35#issuecomment-74451476","issue_url":"https://api.github.com/repos/kenwheeler/mcfly/issues/35","id":74451476,"user":{"login":"zgotsch","id":693087,"avatar_url":"https://avatars.githubusercontent.com/u/693087?v=3","gravatar_id":"","url":"https://api.github.com/users/zgotsch","html_url":"https://github.com/zgotsch","followers_url":"https://api.github.com/users/zgotsch/followers","following_url":"https://api.github.com/users/zgotsch/following{/other_user}","gists_url":"https://api.github.com/users/zgotsch/gists{/gist_id}","starred_url":"https://api.github.com/users/zgotsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zgotsch/subscriptions","organizations_url":"https://api.github.com/users/zgotsch/orgs","repos_url":"https://api.github.com/users/zgotsch/repos","events_url":"https://api.github.com/users/zgotsch/events{/privacy}","received_events_url":"https://api.github.com/users/zgotsch/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T02:13:05Z","updated_at":"2015-02-16T02:13:05Z","body":"Just personal preference, my default expectation is that void functions reach the end of the function. I can restore the return if you prefer that."}}