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
/
lib
/
useInViewport
/
index.d.ts
6 lines
(5 loc)
•
218 B
TypeScript
View Raw
1
2
3
4
5
6
import
'intersection-observer'
;
import
{
BasicTarget
}
from
'../utils/dom'
;
declare
type
InViewport
=
boolean
|
undefined
;
declare
function
useInViewport
(
target
:
BasicTarget
):
InViewport
;
export
default
useInViewport;