From 89cd94096a6bc5e3bf5938cabd6bb8c501ffc436 Mon Sep 17 00:00:00 2001 From: popsiclelmlm Date: Sat, 23 May 2026 14:09:03 +0800 Subject: [PATCH] fix: memoize chip color resolution --- src/components/Chip/Chip.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/Chip/Chip.tsx b/src/components/Chip/Chip.tsx index 78b240703c..23a1984d67 100644 --- a/src/components/Chip/Chip.tsx +++ b/src/components/Chip/Chip.tsx @@ -259,13 +259,17 @@ const Chip = ({ contentOpacity, selectedBackgroundColor, backgroundColor, - } = getChipColors({ - isOutlined, - theme, - selectedColor, - customBackgroundColor, - disabled, - }); + } = React.useMemo( + () => + getChipColors({ + isOutlined, + theme, + selectedColor, + customBackgroundColor, + disabled, + }), + [customBackgroundColor, disabled, isOutlined, selectedColor, theme] + ); const accessibilityState: AccessibilityState = { selected,