If you started your developer career about a decade ago, you probably know how complicated it was to use AJAX in our web applications. However, by ...
For further actions, you may consider blocking this person and/or reporting abuse
Super helpful
Thank you!
Well, you are not wrong because this is pretty much a personal preference.
I just do not agree with you. 😎
Lastly, all the possible options you mention although correct, I think they miss the point.
If you have this:
The point is to refactor into async/await but keep the exact same behaviour.
It does not matter much what that behaviour is on the example (functions don't even have a body here).
Cheers! 🍻 happy coding
I don't think it is easier to read. Besides if you have this:
The order of execution requires you to know that there is a promise here so that the functions are called in this order:
1- fetch
2- bar
3- foo
helpful
Thank you!
Can you get progress information and partial results with the fetch API?
Hey Jakub, I think I didn't get your questions. Can you explain it a little more?
With AJAX in
onreadystatechange
you can not only check whether you got full response, or an error, but also if you got partial response. It is useful for generating progress information if the response is slow (you receive results in spurts) - but of known final size, or for generating partial results.Hi Jakub, for progress and partial results Server Sent Events (SSE - developer.mozilla.org/es/docs/Web/...) may be what you’re looking for.
Typo in the last example?
Hey Mehuge, what do you mean by Typo?
Hey @lukeshiru and @vetras, thanks for sharing your points. I think both ways are completely fine and I also think it depends on personal/team preferences.
So helpful. Thx
Thank you!
Thank you
You're welcome!! :)
Thank you!
You're welcome!! :)
Really good article with lots of info.
Thank you!
Very well organized, easy to understand thanks, am following you 😌
I appreciate it. Thank you! :)
Thanks for putting it all together in one concept pointing out all the different possibilities. Very clear and to the point.
Thank you for your comment. I'm really glad you liked it.