Should We Ditch Axios for Fetch or Ky?

After the recent Axios issue we faced in our project, I’ve been asking myself: Should we keep using Axios, or is it finally time to migrate to modern alternatives? Axios has been a reliable workhorse for years — great interceptors, cancel tokens, and wide compatibility. But every dependency adds risk, and the JS ecosystem has evolved. Here’s a quick, practical comparison of the strongest alternatives: Fetch API → Native in browsers and Node.js (v18+). Zero dependencies, full control, but you handle JSON, errors, and retries manually. Ky → My current favorite. Tiny (~2KB), elegant wrapper around Fetch. Built-in retries, timeouts, hooks, and a super clean API. Perfect developer experience with almost no boilerplate. Undici → The high-performance HTTP/1.1 & HTTP/2 client that actually powers Node.js native Fetch. Blazing fast on the server side. Migration isn’t always trivial (especially if you heavily rely on interceptors), but the payoff in bundle size, security, and long-term maintainability is real. Have you already made the switch in your projects? Or are you staying with Axios? Would love to hear real-world experiences and lessons learned 👇 #JavaScript #NodeJS #WebDevelopment #Frontend #Backend #Axios #Fetch #Ky #Undici

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories