Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
plusgut60377ypromises. callbacks are always used in a different say. But promises are standardized and are easy combinalble. E.g. with Promise.all
And because of that, promises are the only way to go. -
D--M22687yEhhh, whichever you fancy more tbh.
Async is pretty nice too.
Just try to learn them all or make the same code and use them each and see which you prefer.
My only gripe with promises is if you forget to catch one, good luck. -
plusgut60377y@D--M async/await is another reasonto use promises, without promises they don't work.
@biodunch I did use it, but heard lots of bad things about it. They prioritize performance over safety. E.g. they safe the data in memory and tell you it's saved. But if the database would crash, your data would be lost. and that was/is theire default-setting.
Related Rants
Mongoose: Callbacks VS Promises? Opinions and reasons please.
I'm trying to update array of data which involves couple queries.. Best practices?
question
help me
tired as shit
query
mongoose
why me