Skip to content

Commit 8d7a558

Browse files
MelvinBotsituchan
andcommitted
Remove useMemo and comment for itemColor in BasePicker
React Compiler auto-memoizes this, so useMemo is unnecessary. Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
1 parent 8e961d5 commit 8d7a558

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/components/Picker/BasePicker.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,7 @@ function BasePicker<TPickerValue>({
144144
},
145145
}));
146146

147-
/**
148-
* We pass light text on Android, since Android Native alerts have a dark background in all themes for now.
149-
* We use theme.text instead of theme.textLight because textLight maps to a dark color in high contrast themes,
150-
* making picker items invisible on the dark native dialog background.
151-
*/
152-
const itemColor = useMemo(() => theme.text, [theme]);
147+
const itemColor = theme.text;
153148

154149
// Windows will reuse the text color of the select for each one of the options
155150
// so we might need to color accordingly so it doesn't blend with the background.

0 commit comments

Comments
 (0)