Hacker News new | past | comments | ask | show | jobs | submit login

I'm not a fan of mixing await and .then myself;

    let data = await (await fetch('/my/url')).json();
That's a one-liner, but you can split the request and json data as well (and you usually want to anyway because of error handling).



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: