#Should I use native Fetch or a library like Ky?

7 messages · Page 1 of 1 (latest)

violet oriole
#

Hi, all
This is a very simple question, I have extensively used fetch while I do vanilla JS. But In react ecosystem I use axios, just to use interceptors. I do love fetch but again, with native fetch there is much code to write. So, I came across this really small library called, Ky. Should I use this or not, will I loose fetch features like caching.

stuck geodeBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

plucky breach
#

ky is built based on Fetch API so it has all the fetch features

violet oriole
#

That's what I am thinking, so the extension nextJs did like caching and revalidate will work with Ky?

plucky breach
#

that's correct

violet oriole
#

Ok thanks for the clarification @plucky breach

stuck geodeBOT