From 31c1e3a9ca602a88e882261dd6c1ffc0b16dc9e8 Mon Sep 17 00:00:00 2001 From: malangfox Date: Tue, 17 Dec 2024 17:10:58 +0900 Subject: [PATCH] refactor: compare child and nextChild on hasSameChildren --- packages/react-flicking/src/react-flicking/Flicking.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/react-flicking/src/react-flicking/Flicking.tsx b/packages/react-flicking/src/react-flicking/Flicking.tsx index b13f77326..f12340ffe 100644 --- a/packages/react-flicking/src/react-flicking/Flicking.tsx +++ b/packages/react-flicking/src/react-flicking/Flicking.tsx @@ -266,11 +266,7 @@ class Flicking extends React.Component> const same = prevChildren.every((child, idx) => { const nextChild = nextChildren[idx]; - if (child.key && nextChild.key) { - return child.key === nextChild.key && Object.keys(child.props).every(key => child.props[key] === nextChild.props[key]); - } else { - return child === nextChild; - } + return child === nextChild; }); return same;