From 6dc5d32711ad40d6175582cafd4c171d6b25f84e Mon Sep 17 00:00:00 2001 From: Chris Santamaria Date: Mon, 2 May 2022 17:23:07 -0400 Subject: [PATCH] Use React.RefObject for target type (#107) --- src/lib/useInViewport.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/useInViewport.tsx b/src/lib/useInViewport.tsx index 132155a..191fdd9 100644 --- a/src/lib/useInViewport.tsx +++ b/src/lib/useInViewport.tsx @@ -8,7 +8,7 @@ import { defaultOptions, defaultConfig, defaultProps } from './constants'; import type { Config, Props, Options } from './types'; const useInViewport = ( - target: React.MutableRefObject, + target: React.RefObject, options: Options = defaultOptions, config : Config = defaultConfig, props: Props = defaultProps,