XMLHttpRequest (XHR) Vs Fetch API

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

::: spoiler cross-posted on https://lemmy.world/post/14707833 :::

See all comments

Also, you can use Wretch for a really neat builder pattern to make requests.

https://elbywan.github.io/wretch/