From 3cf4f44d6286560aecc3c8decc2e8570cf531005 Mon Sep 17 00:00:00 2001 From: streamich Date: Fri, 17 Jan 2020 09:25:26 +0100 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=92=84=20run=20Prettier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/useCustomCompareEffect.ts | 5 +---- src/useUpdate.ts | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/useCustomCompareEffect.ts b/src/useCustomCompareEffect.ts index 28cd6350..b5c73142 100644 --- a/src/useCustomCompareEffect.ts +++ b/src/useCustomCompareEffect.ts @@ -2,10 +2,7 @@ import { DependencyList, EffectCallback, useEffect, useRef } from 'react'; const isPrimitive = (val: any) => val !== Object(val); -type DepsEqualFnType = ( - prevDeps: TDeps, - nextDeps: TDeps -) => boolean; +type DepsEqualFnType = (prevDeps: TDeps, nextDeps: TDeps) => boolean; const useCustomCompareEffect = ( effect: EffectCallback, diff --git a/src/useUpdate.ts b/src/useUpdate.ts index 8a50dcb2..bcc4511a 100644 --- a/src/useUpdate.ts +++ b/src/useUpdate.ts @@ -4,7 +4,7 @@ const updateReducer = (num: number): number => (num + 1) % 1_000_000; const useUpdate = () => { const [, update] = useReducer(updateReducer, 0); - return update as (() => void); + return update as () => void; }; export default useUpdate;