{"action":"created","comment":{"url":"https://api.github.com/repos/reactjs/react-router/pulls/comments/74172087","id":74172087,"diff_hunk":"@@ -0,0 +1,3 @@\n+export function isPromise(obj) {\n+  return obj && typeof obj.then === 'function'\n+}","path":"modules/PromiseUtils.js","position":3,"original_position":3,"commit_id":"e418bebda9607a99a0992ff1ceda67f87978c4ef","original_commit_id":"e418bebda9607a99a0992ff1ceda67f87978c4ef","user":{"login":"timdorr","id":17882,"avatar_url":"https://avatars.githubusercontent.com/u/17882?v=3","gravatar_id":"","url":"https://api.github.com/users/timdorr","html_url":"https://github.com/timdorr","followers_url":"https://api.github.com/users/timdorr/followers","following_url":"https://api.github.com/users/timdorr/following{/other_user}","gists_url":"https://api.github.com/users/timdorr/gists{/gist_id}","starred_url":"https://api.github.com/users/timdorr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timdorr/subscriptions","organizations_url":"https://api.github.com/users/timdorr/orgs","repos_url":"https://api.github.com/users/timdorr/repos","events_url":"https://api.github.com/users/timdorr/events{/privacy}","received_events_url":"https://api.github.com/users/timdorr/received_events","type":"User","site_admin":false},"body":"Dunno if this is worth throwing in a module. Maybe move it to AsyncUtils at least?","created_at":"2016-08-10T01:12:39Z","updated_at":"2016-08-10T01:12:39Z","html_url":"https://github.com/reactjs/react-router/pull/3719#discussion_r74172087","pull_request_url":"https://api.github.com/repos/reactjs/react-router/pulls/3719","_links":{"self":{"href":"https://api.github.com/repos/reactjs/react-router/pulls/comments/74172087"},"html":{"href":"https://github.com/reactjs/react-router/pull/3719#discussion_r74172087"},"pull_request":{"href":"https://api.github.com/repos/reactjs/react-router/pulls/3719"}}},"pull_request":{"url":"https://api.github.com/repos/reactjs/react-router/pulls/3719","id":80720440,"html_url":"https://github.com/reactjs/react-router/pull/3719","diff_url":"https://github.com/reactjs/react-router/pull/3719.diff","patch_url":"https://github.com/reactjs/react-router/pull/3719.patch","issue_url":"https://api.github.com/repos/reactjs/react-router/issues/3719","number":3719,"state":"open","locked":false,"title":"Add Promise support to async route functions","user":{"login":"timdorr","id":17882,"avatar_url":"https://avatars.githubusercontent.com/u/17882?v=3","gravatar_id":"","url":"https://api.github.com/users/timdorr","html_url":"https://github.com/timdorr","followers_url":"https://api.github.com/users/timdorr/followers","following_url":"https://api.github.com/users/timdorr/following{/other_user}","gists_url":"https://api.github.com/users/timdorr/gists{/gist_id}","starred_url":"https://api.github.com/users/timdorr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timdorr/subscriptions","organizations_url":"https://api.github.com/users/timdorr/orgs","repos_url":"https://api.github.com/users/timdorr/repos","events_url":"https://api.github.com/users/timdorr/events{/privacy}","received_events_url":"https://api.github.com/users/timdorr/received_events","type":"User","site_admin":false},"body":"First pass at #3606. Not 100% happy with it right now. It would be easier to architect if we had guaranteed Promise availability, but alas... \r\n\r\nI've got some practical things in there for Babel's `default` exports. And we can't just accept a Promise instead of a function, since `System.import` won't code split in that case. That's probably the most ugly part of it.\r\n\r\nBut this works:\r\n```jsx\r\n<Route path='/' getComponent={() => System.import('./app')} />\r\n```\r\n![](http://img.pandawhale.com/post-19259-so-I-got-that-going-for-me-whi-CKYI.gif)","created_at":"2016-08-10T01:11:51Z","updated_at":"2016-08-10T01:12:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca51e22eb60442c4bd2e593b1692528cee992293","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/reactjs/react-router/pulls/3719/commits","review_comments_url":"https://api.github.com/repos/reactjs/react-router/pulls/3719/comments","review_comment_url":"https://api.github.com/repos/reactjs/react-router/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reactjs/react-router/issues/3719/comments","statuses_url":"https://api.github.com/repos/reactjs/react-router/statuses/e418bebda9607a99a0992ff1ceda67f87978c4ef","head":{"label":"reactjs:promissory-note","ref":"promissory-note","sha":"e418bebda9607a99a0992ff1ceda67f87978c4ef","user":{"login":"reactjs","id":6412038,"avatar_url":"https://avatars.githubusercontent.com/u/6412038?v=3","gravatar_id":"","url":"https://api.github.com/users/reactjs","html_url":"https://github.com/reactjs","followers_url":"https://api.github.com/users/reactjs/followers","following_url":"https://api.github.com/users/reactjs/following{/other_user}","gists_url":"https://api.github.com/users/reactjs/gists{/gist_id}","starred_url":"https://api.github.com/users/reactjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactjs/subscriptions","organizations_url":"https://api.github.com/users/reactjs/orgs","repos_url":"https://api.github.com/users/reactjs/repos","events_url":"https://api.github.com/users/reactjs/events{/privacy}","received_events_url":"https://api.github.com/users/reactjs/received_events","type":"Organization","site_admin":false},"repo":{"id":19872456,"name":"react-router","full_name":"reactjs/react-router","owner":{"login":"reactjs","id":6412038,"avatar_url":"https://avatars.githubusercontent.com/u/6412038?v=3","gravatar_id":"","url":"https://api.github.com/users/reactjs","html_url":"https://github.com/reactjs","followers_url":"https://api.github.com/users/reactjs/followers","following_url":"https://api.github.com/users/reactjs/following{/other_user}","gists_url":"https://api.github.com/users/reactjs/gists{/gist_id}","starred_url":"https://api.github.com/users/reactjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactjs/subscriptions","organizations_url":"https://api.github.com/users/reactjs/orgs","repos_url":"https://api.github.com/users/reactjs/repos","events_url":"https://api.github.com/users/reactjs/events{/privacy}","received_events_url":"https://api.github.com/users/reactjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reactjs/react-router","description":"A complete routing library for React","fork":false,"url":"https://api.github.com/repos/reactjs/react-router","forks_url":"https://api.github.com/repos/reactjs/react-router/forks","keys_url":"https://api.github.com/repos/reactjs/react-router/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactjs/react-router/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactjs/react-router/teams","hooks_url":"https://api.github.com/repos/reactjs/react-router/hooks","issue_events_url":"https://api.github.com/repos/reactjs/react-router/issues/events{/number}","events_url":"https://api.github.com/repos/reactjs/react-router/events","assignees_url":"https://api.github.com/repos/reactjs/react-router/assignees{/user}","branches_url":"https://api.github.com/repos/reactjs/react-router/branches{/branch}","tags_url":"https://api.github.com/repos/reactjs/react-router/tags","blobs_url":"https://api.github.com/repos/reactjs/react-router/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactjs/react-router/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactjs/react-router/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactjs/react-router/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactjs/react-router/statuses/{sha}","languages_url":"https://api.github.com/repos/reactjs/react-router/languages","stargazers_url":"https://api.github.com/repos/reactjs/react-router/stargazers","contributors_url":"https://api.github.com/repos/reactjs/react-router/contributors","subscribers_url":"https://api.github.com/repos/reactjs/react-router/subscribers","subscription_url":"https://api.github.com/repos/reactjs/react-router/subscription","commits_url":"https://api.github.com/repos/reactjs/react-router/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactjs/react-router/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactjs/react-router/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactjs/react-router/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactjs/react-router/contents/{+path}","compare_url":"https://api.github.com/repos/reactjs/react-router/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactjs/react-router/merges","archive_url":"https://api.github.com/repos/reactjs/react-router/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactjs/react-router/downloads","issues_url":"https://api.github.com/repos/reactjs/react-router/issues{/number}","pulls_url":"https://api.github.com/repos/reactjs/react-router/pulls{/number}","milestones_url":"https://api.github.com/repos/reactjs/react-router/milestones{/number}","notifications_url":"https://api.github.com/repos/reactjs/react-router/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactjs/react-router/labels{/name}","releases_url":"https://api.github.com/repos/reactjs/react-router/releases{/id}","deployments_url":"https://api.github.com/repos/reactjs/react-router/deployments","created_at":"2014-05-16T22:22:51Z","updated_at":"2016-08-10T00:47:46Z","pushed_at":"2016-08-10T01:11:51Z","git_url":"git://github.com/reactjs/react-router.git","ssh_url":"git@github.com:reactjs/react-router.git","clone_url":"https://github.com/reactjs/react-router.git","svn_url":"https://github.com/reactjs/react-router","homepage":"","size":8620,"stargazers_count":14898,"watchers_count":14898,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":3333,"mirror_url":null,"open_issues_count":14,"forks":3333,"open_issues":14,"watchers":14898,"default_branch":"master"}},"base":{"label":"reactjs:next","ref":"next","sha":"7bb88c21d490302a3453b471e5fbf7f1502af2af","user":{"login":"reactjs","id":6412038,"avatar_url":"https://avatars.githubusercontent.com/u/6412038?v=3","gravatar_id":"","url":"https://api.github.com/users/reactjs","html_url":"https://github.com/reactjs","followers_url":"https://api.github.com/users/reactjs/followers","following_url":"https://api.github.com/users/reactjs/following{/other_user}","gists_url":"https://api.github.com/users/reactjs/gists{/gist_id}","starred_url":"https://api.github.com/users/reactjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactjs/subscriptions","organizations_url":"https://api.github.com/users/reactjs/orgs","repos_url":"https://api.github.com/users/reactjs/repos","events_url":"https://api.github.com/users/reactjs/events{/privacy}","received_events_url":"https://api.github.com/users/reactjs/received_events","type":"Organization","site_admin":false},"repo":{"id":19872456,"name":"react-router","full_name":"reactjs/react-router","owner":{"login":"reactjs","id":6412038,"avatar_url":"https://avatars.githubusercontent.com/u/6412038?v=3","gravatar_id":"","url":"https://api.github.com/users/reactjs","html_url":"https://github.com/reactjs","followers_url":"https://api.github.com/users/reactjs/followers","following_url":"https://api.github.com/users/reactjs/following{/other_user}","gists_url":"https://api.github.com/users/reactjs/gists{/gist_id}","starred_url":"https://api.github.com/users/reactjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactjs/subscriptions","organizations_url":"https://api.github.com/users/reactjs/orgs","repos_url":"https://api.github.com/users/reactjs/repos","events_url":"https://api.github.com/users/reactjs/events{/privacy}","received_events_url":"https://api.github.com/users/reactjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reactjs/react-router","description":"A complete routing library for React","fork":false,"url":"https://api.github.com/repos/reactjs/react-router","forks_url":"https://api.github.com/repos/reactjs/react-router/forks","keys_url":"https://api.github.com/repos/reactjs/react-router/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactjs/react-router/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactjs/react-router/teams","hooks_url":"https://api.github.com/repos/reactjs/react-router/hooks","issue_events_url":"https://api.github.com/repos/reactjs/react-router/issues/events{/number}","events_url":"https://api.github.com/repos/reactjs/react-router/events","assignees_url":"https://api.github.com/repos/reactjs/react-router/assignees{/user}","branches_url":"https://api.github.com/repos/reactjs/react-router/branches{/branch}","tags_url":"https://api.github.com/repos/reactjs/react-router/tags","blobs_url":"https://api.github.com/repos/reactjs/react-router/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactjs/react-router/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactjs/react-router/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactjs/react-router/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactjs/react-router/statuses/{sha}","languages_url":"https://api.github.com/repos/reactjs/react-router/languages","stargazers_url":"https://api.github.com/repos/reactjs/react-router/stargazers","contributors_url":"https://api.github.com/repos/reactjs/react-router/contributors","subscribers_url":"https://api.github.com/repos/reactjs/react-router/subscribers","subscription_url":"https://api.github.com/repos/reactjs/react-router/subscription","commits_url":"https://api.github.com/repos/reactjs/react-router/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactjs/react-router/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactjs/react-router/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactjs/react-router/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactjs/react-router/contents/{+path}","compare_url":"https://api.github.com/repos/reactjs/react-router/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactjs/react-router/merges","archive_url":"https://api.github.com/repos/reactjs/react-router/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactjs/react-router/downloads","issues_url":"https://api.github.com/repos/reactjs/react-router/issues{/number}","pulls_url":"https://api.github.com/repos/reactjs/react-router/pulls{/number}","milestones_url":"https://api.github.com/repos/reactjs/react-router/milestones{/number}","notifications_url":"https://api.github.com/repos/reactjs/react-router/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactjs/react-router/labels{/name}","releases_url":"https://api.github.com/repos/reactjs/react-router/releases{/id}","deployments_url":"https://api.github.com/repos/reactjs/react-router/deployments","created_at":"2014-05-16T22:22:51Z","updated_at":"2016-08-10T00:47:46Z","pushed_at":"2016-08-10T01:11:51Z","git_url":"git://github.com/reactjs/react-router.git","ssh_url":"git@github.com:reactjs/react-router.git","clone_url":"https://github.com/reactjs/react-router.git","svn_url":"https://github.com/reactjs/react-router","homepage":"","size":8620,"stargazers_count":14898,"watchers_count":14898,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":3333,"mirror_url":null,"open_issues_count":14,"forks":3333,"open_issues":14,"watchers":14898,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reactjs/react-router/pulls/3719"},"html":{"href":"https://github.com/reactjs/react-router/pull/3719"},"issue":{"href":"https://api.github.com/repos/reactjs/react-router/issues/3719"},"comments":{"href":"https://api.github.com/repos/reactjs/react-router/issues/3719/comments"},"review_comments":{"href":"https://api.github.com/repos/reactjs/react-router/pulls/3719/comments"},"review_comment":{"href":"https://api.github.com/repos/reactjs/react-router/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reactjs/react-router/pulls/3719/commits"},"statuses":{"href":"https://api.github.com/repos/reactjs/react-router/statuses/e418bebda9607a99a0992ff1ceda67f87978c4ef"}}}}
{"actor":{"display_login":"timdorr"}}