From 587429aa1692f11e3887047f49364a5f2a9be38c Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Fri, 27 Nov 2020 12:36:13 -0700 Subject: [PATCH] chore: actually return the void --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 9bd207e..fcb0a88 100644 --- a/src/index.ts +++ b/src/index.ts @@ -43,7 +43,7 @@ function useDeepCompareEffect( checkDeps(dependencies) } // eslint-disable-next-line react-hooks/exhaustive-deps - React.useEffect(callback, useDeepCompareMemoize(dependencies)) + return React.useEffect(callback, useDeepCompareMemoize(dependencies)) } export function useDeepCompareEffectNoCheck( @@ -51,7 +51,7 @@ export function useDeepCompareEffectNoCheck( dependencies: DependencyList, ): UseEffectReturn { // eslint-disable-next-line react-hooks/exhaustive-deps - React.useEffect(callback, useDeepCompareMemoize(dependencies)) + return React.useEffect(callback, useDeepCompareMemoize(dependencies)) } export default useDeepCompareEffect