{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue/issues/3527","repository_url":"https://api.github.com/repos/vuejs/vue","labels_url":"https://api.github.com/repos/vuejs/vue/issues/3527/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue/issues/3527/comments","events_url":"https://api.github.com/repos/vuejs/vue/issues/3527/events","html_url":"https://github.com/vuejs/vue/issues/3527","id":173253915,"number":3527,"title":"Returnable async promises","user":{"login":"smithb1994","id":14811263,"avatar_url":"https://avatars.githubusercontent.com/u/14811263?v=3","gravatar_id":"","url":"https://api.github.com/users/smithb1994","html_url":"https://github.com/smithb1994","followers_url":"https://api.github.com/users/smithb1994/followers","following_url":"https://api.github.com/users/smithb1994/following{/other_user}","gists_url":"https://api.github.com/users/smithb1994/gists{/gist_id}","starred_url":"https://api.github.com/users/smithb1994/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smithb1994/subscriptions","organizations_url":"https://api.github.com/users/smithb1994/orgs","repos_url":"https://api.github.com/users/smithb1994/repos","events_url":"https://api.github.com/users/smithb1994/events{/privacy}","received_events_url":"https://api.github.com/users/smithb1994/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vuejs/vue/labels/feature%20request","name":"feature request","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-25T16:44:36Z","updated_at":"2016-08-26T08:24:16Z","closed_at":null,"body":"Vue.components allow promise (resolve, reject), but they don't allow returnable promises. I want to be able to return a promise for async components.  \r\nI want to do this:  \r\n```javascript\r\nVue.component('async-component', function () {\r\n  return new Promise(function (resolve, reject) {\r\n    //step 1\r\n  }).then(function () {\r\n    //step 2\r\n  }).then(function () {\r\n    return { \r\n      template: '<p>hi</p>' \r\n    }\r\n  })\r\n\r\n})\r\n\r\nnew Vue({ \r\n\tel: '#demo' \r\n})\r\n```\r\n\r\nrather than this:  \r\n```javascript\r\nVue.component('async-component', function (resolve, reject) {\r\n  new Promise(function (resolve, reject) {\r\n    //step 1\r\n  }).then(function () {\r\n    //step 2\r\n  }).then(function () {\r\n    resolve({ \r\n      template: '<p>hi</p>' \r\n    })\r\n  }).catch(function (error) {\r\n    reject(error)\r\n  })\r\n\r\n})\r\n\r\nnew Vue({ \r\n\tel: '#demo' \r\n})\r\n```"},"comment":{"url":"https://api.github.com/repos/vuejs/vue/issues/comments/242664625","html_url":"https://github.com/vuejs/vue/issues/3527#issuecomment-242664625","issue_url":"https://api.github.com/repos/vuejs/vue/issues/3527","id":242664625,"user":{"login":"LinusBorg","id":1444526,"avatar_url":"https://avatars.githubusercontent.com/u/1444526?v=3","gravatar_id":"","url":"https://api.github.com/users/LinusBorg","html_url":"https://github.com/LinusBorg","followers_url":"https://api.github.com/users/LinusBorg/followers","following_url":"https://api.github.com/users/LinusBorg/following{/other_user}","gists_url":"https://api.github.com/users/LinusBorg/gists{/gist_id}","starred_url":"https://api.github.com/users/LinusBorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinusBorg/subscriptions","organizations_url":"https://api.github.com/users/LinusBorg/orgs","repos_url":"https://api.github.com/users/LinusBorg/repos","events_url":"https://api.github.com/users/LinusBorg/events{/privacy}","received_events_url":"https://api.github.com/users/LinusBorg/received_events","type":"User","site_admin":false},"created_at":"2016-08-26T08:24:16Z","updated_at":"2016-08-26T08:24:16Z","body":"What would be the advantage of this? "}}
{"actor":{"display_login":"LinusBorg"}}