Javascript Fetch Sucks! Ky is better

preview_player
Показать описание
#ky #javascript #fetchapi

Checkout Ky

🎉Our Newsletter is live! Join thousands of other developers

-- Special Links

✨ Join Figma for Free and start designing now!

👉 ✨ Join Figma For Professionals And Start Designing with your Team ✨

-- Watch More Videos

🧭 Build Login/Register API Server w/ Authentication | JWT Express AUTH using Passport.JS and Sequelize

🧭 Turn Design into React Code | From prototype to Full website in no time

🧭 Watch Tutorial on Designing the website on Figma

🧭 Watch Create a Modern React Login/Register Form with smooth Animations

🧭 Debug React Apps Like a Pro | Master Debugging from Zero to Hero with Chrome DevTools

🧭 Master React Like Pro w/ Redux, Typescript, and GraphQL | Beginner to Advanced in React

🧭 Learn Redux For Beginners | React Redux from Zero To Hero to build a real-world app

🧭 Introduction to GraphQL with Apollo and React

Made with 💗 by Coderone
Рекомендации по теме
Комментарии
Автор

This package seems to be a stronger promise for the future. But, I haven't seen any motives to use this one instead of Fetch or Axios (obviously, creating a helper to make this better and concise).

JrMarquesHD
Автор

I personally don't see throwing 404 and 500 as exceptions a good thing. What do you do in GraphQL where errors have 200 status?
Would be much nicer if they expressed errors as values (and documented possible errors codes... which is not done for fetch – a typical JS insanity)

IvanKleshnin
Автор

What’s actually wrong with fetch? Just wrap it in a function and reuse. Don’t fix it if it’s not broken.

henshalb
Автор

Title: "Javascript Fetch Sucks! Ky is better"

Ky: uses fetch to do the job

AndreiZhukouski
Автор

in your code snippet retry when status code = 404 (Not Found) 🤨 !? why !

mahmoudelshazly
Автор

Is this a satire? Please tell me its a satire...

lemek
Автор

hmm...fetch can be available for most cases and go axios if you want interceptor.

lihinfei
Автор

looks much better then fetch API, I always hated fetch with all its configuration...

djpunisha
Автор

Really it's a powerful library, except the missing functionalities such as the progress of load file in upload or download

DjamelBouzidi
Автор

Thaaaat's awesome. But right now I have a Task to migrate from Ky to Axios. Maybe this package in the future could be a better choice, but right now I chose Axios!

pedrodias.fullstack
Автор

There are dozen of somewhat popular wrappers around native api to make ajax request, picking one based on random yt video is wrong, you need to check out 10 wrappers then pick one or write your own, if you even need a wrapper at that point, maybe going raw without wrappers is better.
And whatever you do, 6 month later someone will blame you for making wrong choice, and not using this weeks coolest thing.

moofymoo
Автор

I think these libraries contribute to creating a good development environment,
Senior developers are becoming increasingly conservative

mfftizl
Автор

fetch still does not support upload progress so as ky, there r literally no reasons to switch from this pov, axios does the job perfectly in any scenarios and more mature

yani
Автор

"I don't see any valid reason that you can continue using fetch..."

Yeah, sure. Why even bother to use a native API that works totally fine and actually doesn't suck at all, better to add a third-party lib (with possible bugs, maintainance issues and support longevity) that still natively uses the fetch api.

abcq
Автор

You realy don't anything more than fetch.

justafreakable
Автор

yet another abstraction over abstraction. as usual useless

gnom-om