Skip to main content

Callback Hell

Before jumping into the topic of this blog I'm going to first talk about how it came to existence in the first place. While developing applications (web in general) and especially on the backend, we always face that need to make asynchronous calls to do stuff once others finish. And to solve this issue developers usually used nested functions also known by callbacks. While it solved the problem it still caused what is known by callback hell.

Image result for callback hell

Callbacks don't scale and are not good practice as far as I know. We can fix this issue and write better and readable code that works asynchronously but looks synchronous with the use of promises.

Comments