@ejp/react-hook-axios
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

React Hook Axios

yarn add @ejp/react-hook-axios

A small utility hook to use Axios in your React components, with a simple and familiar API.

USAGE

See the small app in /example for a demo.

import useAxios from '@ejp/react-hook-axios';

...
const [{ data, error, loading }, retry] = useAxios(
  {
    url: 'https://my.api',
    method: 'get',
  },
  []
);

// TODO

Project was bootstraped with the excellent TSDX framework.

Readme

Keywords

none

Package Sidebar

Install

npm i @ejp/react-hook-axios

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

33.5 kB

Total Files

18

Last publish

Collaborators

  • ejp