Skip to content

A small utility hook to use Axios in your React components, built with TypeScript

License

Notifications You must be signed in to change notification settings

edwardpayton/react-axios-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A small utility hook to use Axios in your React components, built with TypeScript

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published