From 1c971bb57836baa261de230ed49da068a3d2b5ad Mon Sep 17 00:00:00 2001 From: "younghoon100.park" Date: Thu, 15 Feb 2024 15:49:34 +0900 Subject: [PATCH] [components] CustomImage Detail Notes : 1. memoization --- .../src/components/CustomImage/CustomImage.jsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/com.twin.app.shoptime/src/components/CustomImage/CustomImage.jsx b/com.twin.app.shoptime/src/components/CustomImage/CustomImage.jsx index a2329f7e..c5329393 100644 --- a/com.twin.app.shoptime/src/components/CustomImage/CustomImage.jsx +++ b/com.twin.app.shoptime/src/components/CustomImage/CustomImage.jsx @@ -3,13 +3,16 @@ * * @module CustomImage */ -import React, { useCallback, useEffect, useState, useRef } from "react"; +import React, { memo, useCallback, useEffect, useRef, useState } from "react"; + import classNames from "classnames"; + import { Job } from "@enact/core/util"; + import css from "./CustomImage.module.less"; //animationSpeed : "slow", "normal", "fast", ==> 500ms, 250ms, 10ms -export default function CustomImage({ +export default memo(function CustomImage({ src, className, hide, @@ -56,4 +59,4 @@ export default function CustomImage({ alt="" /> ); -} +});