Redaxios Fetch Wrapper With an Axios API

Packages

April 23rd, 2020

api-computer-laravelnews-featured.png

Redaxios is an NPM module by Jason Miller that provides a middle-ground solution when you want to have a lightweight Axios-like API wrapper around the fetch() API—which most modern browsers support:

Axios has a great API that developers love. Redaxios provides that API in 800 bytes, using native fetch().

For those searching for ways to shave a few kilobytes off of their bundles, that’s less than 1/5th of the size. This is made possible by using the browser’s native Fetch API, which is supported in all modern browsers and polyfilled by most tools including Next.js, Create React App and Preact CLI.

Jason Miller is behind other awesome minimal JS projects such as preact, microbundle, mitt, and htm to name a few.

You can learn more about this package, get full installation instructions, and view the source code on GitHub at developit/redaxios.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.