2.0.0 • Published 5 years ago
use-axios-client v2.0.0
Installation
with npm:
$ npm install use-axios-client
with yarn:
$ yarn add use-axios-client
Example
import { useAxios } from 'use-axios-client';
export default () => {
const { data, error, loading } = useAxios({
url: 'https://example/api',
});
return (
<>
{loading && <div>Loading...</div>}
{error && <div>{error.message}</div>}
{data && <div>{data}</div>}
</>
);
};
Docs
Contributing
Clone the repository:
$ git clone https://github.com/angelle-sw/use-axios-client
Install dependencies:
$ yarn
Run the example app at http://localhost:8080:
$ cd example
$ yarn
$ yarn start
Run tests using jest:
$ yarn test
2.0.0
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
1.0.0-rc.2
5 years ago
1.0.0-rc.1
5 years ago
1.0.0-rc.0
5 years ago