Skip to content

Instantly share code, notes, and snippets.

View Sagargajare's full-sized avatar
🌏
Open to Work

Sagar Gajare Sagargajare

🌏
Open to Work
View GitHub Profile
@popescuaaa
popescuaaa / useAxios.ts
Created August 16, 2021 13:12
react typescript axios hook
/* eslint-disable react-hooks/exhaustive-deps */
import { useEffect, useState } from "react";
import axios, { Method } from "axios";
/**
* https://github.com/ali-master/react-typescript-hooks-sample
*/
const useFetch = (
url: string,
method: Method,