UNPKG
use-minimal-fetch
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
A lightweight useFetch hook with Axios wrapper for React apps
use-minimal-fetch
/
dist
/
hooks
/
usePost.d.ts
11 lines
(10 loc)
•
264 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
interface
PostOptions
{
headers
?:
Record
<
string
,
string
>; }
export
declare
const
usePost
: <T =
any
, R =
any
>
(
url
:
string
,
options
?:
PostOptions
) =>
{
data
: R |
null
;
loading
:
boolean
;
error
:
any
;
post
:
(
payload
: T
) =>
Promise
<R>; };
export
{};