Skip to content

Instantly share code, notes, and snippets.

@didierfranc
Created May 21, 2016 01:36
Show Gist options
  • Save didierfranc/3ba76f17edb6e9f5895555d735aef026 to your computer and use it in GitHub Desktop.
Save didierfranc/3ba76f17edb6e9f5895555d735aef026 to your computer and use it in GitHub Desktop.
Fetch + ES7 Async Functions 😍
const get = u => fetch(u).then(r => r.json())
const profile = async() => {
let data = await get(url)
let { pseudo, email, avatar } = data
}
// πŸ‘‰ http://babeljs.io/docs/plugins/transform-runtime/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment