this post was submitted on 26 Apr 2024
1 points (60.0% liked)

WebDev

1142 readers
1 users here now

Community for all things Web Development related.

founded 1 year ago
MODERATORS
 

cross-posted from: https://programming.dev/post/13268260

Hi,

I discovered this webpage
https://developer.mozilla.org/en-US/docs/Glossary/XMLHttpRequest

Where it say

The Fetch API is the modern replacement for XMLHttpRequest.

Without further explain on why so...

Did you (yourself) migrated from XHR to The Fetch API ? and is it better ? or do you know any (not bias) article about it ?

What about performances etc..

Thanks

top 2 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 3 points 6 months ago (1 children)

I did, just being able to use promises is already worth it. Performance mostly depends on the server you're calling so I didn't really look at that. Fetch is just a lot more user friendly.

[โ€“] [email protected] 1 points 6 months ago

A very big step up in developer experience, indeed.