use http react hook in react application
write this command line to install the package
npm install react-http-hook
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;