DEV Community

Discussion on: Do you prefer callbacks, promises, or async/await?

Collapse
 
qmenoret profile image
Quentin Ménoret

For me all of them have a different purpose. By default, if you want sequential code: Async/Await. More readable.
If you are in an event driven code (with a trigger that can be called several time), you have to use callbacks.
In some very specific cases, I use promises, for instance to have a queue of operation

Collapse
 
raguay profile image
Richard Guay

I agree. Everything has it’s best use case and nothing is the best tool for everything.