Тёмный

Fetch HTTP Client is now Better 

DotConnect
Подписаться 1,1 тыс.
Просмотров 2,7 тыс.
50% 1

Are we still recommending to use axios? I know axios is excellent package but..
axios
alova.js.org/
redaxios
www.npmjs.com/...
alova
alova.js.org/
#nextjs14 #axios #http #react

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 16   
@rand0mtv660
@rand0mtv660 4 месяца назад
fetch is cached here because I'm assuming you are using Next.js. This is not standard fetch behavior and is apparently something that Next.js team will potentially change because patching global fetch function isn't a good approach. Also, one example where axios is better is if you need to display file upload percentage. fetch API cannot at the moment track the progress of a file upload.
@DotConnect0057
@DotConnect0057 4 месяца назад
Exactly, cache is noted in this video. I also tried to use no-store to not cache.
@MarlonEnglemam
@MarlonEnglemam 4 месяца назад
you made a great point! Axios being able to keep track of the progress of a api call is something we should not overlook!
@XaldreTheOriginal
@XaldreTheOriginal 4 месяца назад
Basically it's because Axios had a major vulnerability, as far as I know that's all
@falianaranai3713
@falianaranai3713 3 месяца назад
is redaxios updated from the axios new updates?
@DotConnect0057
@DotConnect0057 3 месяца назад
I realized redaxios is not updated from 2 years ago. so this would not be track latest changes of axios.
@orangepirobot6022
@orangepirobot6022 4 месяца назад
Response.ok checks whether the status is in the range 200-299 rather than just comparing it to 200. Axios defaults to rejecting its promise for statuses outside of that range, so this block is redundant.
@Tassaczek
@Tassaczek 4 месяца назад
Question is: What made axios so popular. What it do, that fetch can't.
@TheBswan
@TheBswan 4 месяца назад
Axios automatically parses json, and its interceptor interface is nice to use. Plus being able to configure an axios instance or set properties on axios global is nice compared to just wrapping fetch. Either tool works just fine.
@SanjayDevTech
@SanjayDevTech 4 месяца назад
Try with vanilla js not with nextjs
@DeathSugar
@DeathSugar 4 месяца назад
Bruh. What a web simlish it is.
@DotConnect0057
@DotConnect0057 4 месяца назад
Why Axios keeping big?
@MarlonEnglemam
@MarlonEnglemam 4 месяца назад
I suppose thats because axios implements XMLHttpRequests under the hood? Fetch does not do that. (thats why only axios is able to keep track of upload progress for example)
@AntonioRonde
@AntonioRonde 4 месяца назад
please improve your grammar
Далее
Kenji's Sushi Shop Showdown - Brawl Stars Animation
01:55
Я ИДЕАЛЬНО ПОЮ
00:31
Просмотров 354 тыс.
Joining Zoom Meeting SDKs: Encoding JWT
3:31
How to make a TODO app using React.js
14:14
Are we going back to PHP with fullstack JavaScript?
9:57
Way to Manage Loading
3:05
Просмотров 2,6 тыс.
How to Develop MultiStream Web App Part#1
16:44
Kenji's Sushi Shop Showdown - Brawl Stars Animation
01:55