Skip to content

Commit bfd0ff4

Browse files
committed
Default hook options object to an empty object
1 parent 10871e7 commit bfd0ff4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type HookOptions = Partial<
1010
>
1111

1212
export default function useIsInViewport(
13-
options: HookOptions
13+
options: HookOptions = {}
1414
): [boolean | null, CallbackRef, CallbackRef] {
1515
const [isInViewport, setIsInViewport] = useState<boolean | null>(null)
1616
const { target, viewport, ...restOpts } = options

0 commit comments

Comments
 (0)