| ▲ | jwilliams 4 hours ago | |||||||
I do "just use fetch" nowadays -- but I have to say, axios definitely has better ergonomics than fetch, especially for calling APIs. | ||||||||
| ▲ | sampullman 3 hours ago | parent | next [-] | |||||||
I drag a tiny fetch wrapper around with error/json handling, timeouts and basic interceptor support. It doesn't cover everything axios does but it's nice enough and I haven't had to touch it in a couple years. For reference: https://github.com/sampullman/fetch-api/blob/main/lib/fetchA... | ||||||||
| ▲ | nurettin 3 hours ago | parent | prev [-] | |||||||
When the vulnerability was announced, it took me two minutes to one-shot convert an entire legacy project from axios to fetch (it already wrapped api calls neatly), react cra to vite, update all dependencies, convert to deep imports to reduce bundle size and get zero npm warnings while fetching coffee. There is just no excuse to use it. | ||||||||
| ||||||||