JavaScript Callback Hell
Discussions center on 'callback hell' in JavaScript/Node.js asynchronous programming, debating whether it's still relevant, a result of poor code structure, or solved by promises and async/await.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Yeah, callbacks are fine until you get a big stack of them (so-called “callback hell”). Promises were the touted solution to callback hell, async/await the touted solution to endless promises chaining. While async/await is (tasty) syntactic sugar for promises, I think it’s a real improvement over callbacks - it’s one less argument to every function (because of promises) and I think it’s easier to read: there tends to be less nesting.
"callback hell" is just a sign that you did not split your code into small functional chunks, nothing more. promises/async/await might have its place, but "callback hell" is developer's fault, who can't shake off linear coding past, not language's.
isn't "callback hell" a bit old fashioned now? With promises and async/await etc.
Who actually thinks like this?Callbacks were absolutely unmaintainable. Promises (and `async/await`) are really not that hard.
Callback hell? What is this 2010? Callback hell is a non-issue in modern JS code with promises, and async/await.
Well put. It still puzzles me that promises and/or CPS don't have a greater adoption in the JavaScript community. I guess that what happens is that the concept of a callback is a very easy to understand one, but a system becomes more complicated and cumbersome (exponentially, I would say) with every new callback that is added to it. The real problem comes when creating big async applications in JavaScript based entirely in callbacks, as it is the norm now specially in NodeJS projects. Using call
That's like callback hell in JS.
do the words "callback hell" mean anything to you?
...This way lies callback hell.
The JavaScript callback hell thing is pretty much solved now isn't it?