From d1d7c6da8139e1163a367517c28fe052b2d2329a Mon Sep 17 00:00:00 2001 From: yonghyon Date: Wed, 7 Aug 2024 12:31:20 +0900 Subject: [PATCH] text format error --- com.twin.app.shoptime/src/hooks/useWhyDidYouUpdate.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/com.twin.app.shoptime/src/hooks/useWhyDidYouUpdate.js b/com.twin.app.shoptime/src/hooks/useWhyDidYouUpdate.js index 25bc107d..fb37dc4d 100644 --- a/com.twin.app.shoptime/src/hooks/useWhyDidYouUpdate.js +++ b/com.twin.app.shoptime/src/hooks/useWhyDidYouUpdate.js @@ -12,13 +12,12 @@ import { useState as useReactState } from "react"; const useWhyDidYouUpdate = (name, props) => { return { USE_STATE: (stateName, initialValue) => useReactState(initialValue), - USE_SELECTOR: (selectorName, selector, equalityFn) => - useReduxSelector(selector, equalityFn), + USE_SELECTOR: (selectorName, selector, equalityFn) => useReduxSelector(selector, equalityFn), }; - // Ϸ κ ּóϰ Ʒκ 츮 . - // Effect ó ȵǼ εϰ.. /* + // 디버깅 하려면 윗부분 주석처리하고 아래부분 살리면 됨. + // Effect는 조건 처리가 안되서 부득이하게.. const previousProps = useRef(props); useEffect(() => { console.log("[why-did-you-update] created ", name, props);