What about Axios?
Unanswered
Transvaal lion posted this in #help-forum
Transvaal lionOP
I am beginner in Next.js and I wonder about possible troubles of using Axios in Next.js project.
I would like to read about your opinion.
Let's imagine a project with @tanstack/query (react-query).
I should decide, how to fetch data within react-query: using Axios or using modified
As I know, all features of modified fetch() is working with cache (remember response for some time or invalidate request using tags).
Probably I don't even need it, because react-query suggests its own caching system with keys, invalidating, etc.
I would like to read about your opinion.
Let's imagine a project with @tanstack/query (react-query).
I should decide, how to fetch data within react-query: using Axios or using modified
fetch()
.As I know, all features of modified fetch() is working with cache (remember response for some time or invalidate request using tags).
Probably I don't even need it, because react-query suggests its own caching system with keys, invalidating, etc.
2 Replies
@Transvaal lion I am beginner in Next.js and I wonder about possible troubles of using Axios in Next.js project.
I would like to read about your opinion.
Let's imagine a project with @tanstack/query (react-query).
I should decide, how to fetch data within react-query: using Axios or using modified `fetch()`.
As I know, all features of modified fetch() is working with cache (remember response for some time or invalidate request using tags).
Probably I don't even need it, because react-query suggests its own caching system with keys, invalidating, etc.
Axios is dead. Use
If you need further useability for
fetch
instead. You can read about it here: https://www.adios-axios.com/If you need further useability for
fetch
use [ky](https://www.npmjs.com/package/ky/v/0.9.0)Transvaal lionOP
Oh... 😢
Thank you.
Good bye axios
Thank you.
Good bye axios