React hooks for Axios with built-in server-side rendering support. Current stable version is 5.1.1, compatible with axios@1.x. Zero-configuration setup; one-line usage. Released infrequently (last major update 2023). Key differentiators: minimal API surface, automatic request cancellation on unmount, built-in caching and SSR support via serialize/load cache. Comparable to useSWR but specifically for Axios.
npm install axios-hooksNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage of useAxios with URL, loading/error states, and refetch.
Review license compatibility before use; consider alternatives if license is problematic.
Use axios@1.x or downgrade to axios-hooks@4.x for axios@0.x.
import useAxios from 'axios-hooks' — no curly braces.
Use the third return value for manual execution; cancellation requires axios.CancelToken (legacy) or AbortController (modern).
Change to: import useAxios from 'axios-hooks'
Run: npm install axios
Pass a string URL or an Axios config object as first argument.