Or how my code became way easier to read after replacing promises and callbacks with the new async/await features of ES7.

Replacing Promises

Promises are a great way to perform asynchronous tasks. You describe what you want to happen once the task completes, freeing your app to do other tasks in the meantime.

Here’s an example of a request using promises.

This code is pretty straightforward, but might be confusing to those learning Javascript since execution order isn’t obvious. Between each .then()

About

Chris Pouliot

Software Developer | chrispouliot.codes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store