Data fetching with Axios
Answered
Broad-snouted Caiman posted this in #help-forum
Broad-snouted CaimanOP
I don’t want to use fetch for data fetching, I prefer Axios, but is there a way I can fetch data with Axios and also path caching params eg revalidate to an Axios request?
fetch('https://...', { next: { revalidate: 3600 } })
Basically what is the equivalent of this, but in Axios
fetch('https://...', { next: { revalidate: 3600 } })
Basically what is the equivalent of this, but in Axios
Answered by riský
only with unstable_cache, nextjs has added this feature for fetch req, not anything else
5 Replies
only with unstable_cache, nextjs has added this feature for fetch req, not anything else
Answer
also, why do you like axios so much, this page shows why it is bad: https://www.adios-axios.com/ (with alternatives that are prob less buggy)
Broad-snouted CaimanOP
So gotta use ky then
Really don’t like native fetch, requires too much boiler plate
@Broad-snouted Caiman So gotta use ky then
Scaly-naped Pigeon
wow Thank you! I want to find this kind of thing