ricardoekm / Kyrix

Interactive pan/zoom data visualizations at scale
0 stars 0 forks source link

Favor async/await over callbacks #10

Open ricardoekm opened 5 years ago

ricardoekm commented 5 years ago

The coding idioms to deal with the single-thread javascript environment have evolved over time from callbacks to promises to async/await.

async/await offers an elegant code solution to implement async code as it were synchronous, making the code easier to understand and avoiding callback hells.

https://github.com/ricardoekm/Kyrix/blob/0ce6879a307f1d16440ef79fa978d9dc529020a2/compiler/src/index.js#L729-L764