Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
dindin27613dOr not 🤔
Promises are definitly difficult to get your head around at first, but once you do (sometimes it takes a few times) they click and make a lot of sense. They also absolutely make your life easier.
Stick with it.
and honestly, ignore the complicated things for now. Start with the basics, and use them until you sort of get it. then keep going and adding little bits on until it all just clicks. That will save you a lot of hassle and confusion.
nibor265013dI finally got my head around promises, then went away for a week. They made no sense again when I returned!
Observables do the same thing to me
dindin27613dSo you have experienced the callback hell that existed before promises?
They ain't that difficult to wrap your head around, maybe you should try async/await it will be more familiar to you, the syntax is nice.
d4ng3r0u5440913dConverting between promises, callbacks, streams, events, async etc is good fun
bryceleo18613dThis was me a few months ago. If you ditch promise chains and work with async/await it makes it easier I think. I also did all my promise learning on typescript not pure JS so that may have colored my view
tekashi4612413dPromises are not the issue, they are present in most other languages (Futures in jvm languages), the problem is no consensus on what to use so libraries might use promises, might need callbacks or might just return async values.
angrydev235716511dInterestingly I find promises much harder than observables. Maybe this is because I have most of my js experience in Angular.