We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10871e7 commit bfd0ff4Copy full SHA for bfd0ff4
src/index.ts
@@ -10,7 +10,7 @@ export type HookOptions = Partial<
10
>
11
12
export default function useIsInViewport(
13
- options: HookOptions
+ options: HookOptions = {}
14
): [boolean | null, CallbackRef, CallbackRef] {
15
const [isInViewport, setIsInViewport] = useState<boolean | null>(null)
16
const { target, viewport, ...restOpts } = options
0 commit comments