"Can someone explain the diff between fetch and xhr type in plain terms?"
hey folks, been using both fetch and xhr type for API calls but still kinda fuzzy on the *main* diff between them.
fetch is newer, promise-based, and way cleaner syntax imo. xhr type feels older, more verbose with all those callbacks.
but like, is there a *real* advantage to one over the other? or is it just preference?
also, heard fetch doesn’t handle errors as smoothly? true or nah?
would love some clarity on the diff between fetch and xhr type—thanks!
(ps: if this has been asked before, my bad—link me!)
hey folks, been using both fetch and xhr type for API calls but still kinda fuzzy on the *main* diff between them.
fetch is newer, promise-based, and way cleaner syntax imo. xhr type feels older, more verbose with all those callbacks.
but like, is there a *real* advantage to one over the other? or is it just preference?
also, heard fetch doesn’t handle errors as smoothly? true or nah?
would love some clarity on the diff between fetch and xhr type—thanks!
(ps: if this has been asked before, my bad—link me!)
