UNPKG
ahooks-v2
Version:
latest (2.10.15)
2.10.15
2.10.13
react hooks library
github.com/alibaba/hooks
alibaba/hooks
ahooks-v2
/
es
/
useBoolean
/
index.d.ts
7 lines
(6 loc)
•
211 B
TypeScript
View Raw
1
2
3
4
5
6
7
export
interface
Actions
{
setTrue
:
() =>
void
;
setFalse
:
() =>
void
;
toggle
:
(
value
?:
boolean
|
undefined
) =>
void
; }
export
default
function
useBoolean
(
defaultValue
?:
boolean
): [
boolean
,
Actions
];