the solution to both callback hell and promise hell for me has been modularizing stuff in classes.
And async await, for SOME reason only works half the time for me.
Then again addEventListener and the whole chromium apis use callbacks, so they arent dead?
Is there any consensus? I find callbacks more pleasant to work with, unlike the whole returning promises thing
Wat is promise hell? That sounds impossible
async await works every time
But no, callbacks are not obsolete, there are many situations where you can't easily replace callbacks with promises, setInterval is a good example
Обсуждают сегодня