▲ | patates 6 hours ago | |||||||||||||||||||||||||||||||
I really don't understand this colored functions debate. Async functions are just functions that return Promise<T> instead of T. You can use them in a non-async function but you must then switch to callbacks, because you hold a promise. I don't get how this is confusing, unless you define the whole concept of concurrency in a single thread that runs your UI as well confusing. Hooks are functions that need to be called before early returning, in a function that provides a context for them. They are also just Javascript, they can be implemented with no build tools. | ||||||||||||||||||||||||||||||||
▲ | WickyNilliams 6 hours ago | parent [-] | |||||||||||||||||||||||||||||||
It's not confusing. It's an observation on their nature. The colouring isn't specific to promises, or even async/await. It applies to continuation style callbacks too. If you haven't, I recommend reading the (original?) article https://journal.stuffwithstuff.com/2015/02/01/what-color-is-... | ||||||||||||||||||||||||||||||||
|