DEV Community

loading...

Discussion on: Explain the synchronous, callback, and async-await (promises) approach like I am 10🧒

pankajtanwarbanna profile image
Pankaj Tanwar Author

Yeah. My intention here was to show that we have no control over callback. Not saying you will get spam with callback. SPAM MEANS "NO CONTROL OVER CALLBACK"

Thread Thread
idanarye profile image
Idan Arye

Is this an actual problem? The callbacks framework is no a potentially malicious agent that just waits for you to give it a callback so it could abuse it. If it wanted to cause damage, it could just use the fact that it is allowed to run code and even perform IOs. I've never seen a framework that does weird stuff with the callback - you can usually trust it to only run the callback once when the promise is ready.

Forem Open with the Forem app