UNPKG
@fetch-suit/react-fetch-interceptor
Version:
latest (0.0.6)
0.0.6
0.0.5
0.0.4
0.0.3
0.0.1
a very simple fetch interception solution for react
github.com/hungtcs/fetch-suit
hungtcs/fetch-suit
@fetch-suit/react-fetch-interceptor
/
dist
/
hooks.js
7 lines
(6 loc)
•
174 B
JavaScript
View Raw
1
2
3
4
5
6
7
import
{ useContext }
from
'react'
;
import
{
FetchContext
}
from
'./context.js'
;
export
function
useFetch
(
) {
const
fetch =
useContext
(
FetchContext
);
return
fetch; }