react-http-hook

1.0.3 • Public • Published

React-http-hook

use http react hook in react application


Installation

write this command line to install the package

npm install react-http-hook

Useage

this is an example to create http hook

import {createHttpHook} from 'react-http-hook'


export default const useHttp = createHttpHook({
  baseUrl:string,
  defaultApplyError:(error:any) => void,
  getToken:() => string,
  refreshToken:(response:Response) => void,
  logout:() => void
});

export default useHttp;

Readme

Keywords

Package Sidebar

Install

npm i react-http-hook

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

22.9 kB

Total Files

7

Last publish

Collaborators

  • basel_askar