Aergonus / EEIT

Electrical Engineering Inventory Tracker
MIT License
0 stars 0 forks source link

Promises? #4

Open Aergonus opened 7 years ago

Aergonus commented 7 years ago

Should we use promises or callbacks?

jshih7 commented 7 years ago

For now I don't see any pressing reason to use promises. They function pretty much the same way as callbacks except its syntactic sugar. They come up more as a substitute for nested callbacks where implementation is ugly. Both callbacks and promises are asynchronous.

https://www.quora.com/Whats-the-difference-between-a-promise-and-a-callback-in-Javascript