UNPKG

@fetch-suit/react-fetch-interceptor

Version:

a very simple fetch interception solution for react

7 lines (6 loc) 174 B
import { useContext } from 'react'; import { FetchContext } from './context.js'; export function useFetch() { const fetch = useContext(FetchContext); return fetch; }