@@ -2,6 +2,7 @@ import {deepEqual} from 'fast-equals';
22import React , { useEffect , useRef , useState } from 'react' ;
33import type { StyleProp , TextStyle , ViewStyle } from 'react-native' ;
44import { InteractionManager , StyleSheet , View } from 'react-native' ;
5+ import { useMemoizedLazyExpensifyIcons } from '@hooks/useLazyAsset' ;
56import useLocalize from '@hooks/useLocalize' ;
67import useStyleUtils from '@hooks/useStyleUtils' ;
78import useTheme from '@hooks/useTheme' ;
@@ -14,7 +15,6 @@ import Button from './Button';
1415import DisplayNames from './DisplayNames' ;
1516import Hoverable from './Hoverable' ;
1617import Icon from './Icon' ;
17- import * as Expensicons from './Icon/Expensicons' ;
1818import MoneyRequestAmountInput from './MoneyRequestAmountInput' ;
1919import OfflineWithFeedback from './OfflineWithFeedback' ;
2020import PressableWithFeedback from './Pressable/PressableWithFeedback' ;
@@ -112,6 +112,7 @@ function OptionRow({
112112 const styles = useThemeStyles ( ) ;
113113 const StyleUtils = useStyleUtils ( ) ;
114114 const { translate, localeCompare} = useLocalize ( ) ;
115+ const icons = useMemoizedLazyExpensifyIcons ( [ 'DotIndicator' , 'Checkmark' ] as const ) ;
115116 const pressableRef = useRef < View | HTMLDivElement > ( null ) ;
116117 const [ isDisabled , setIsDisabled ] = useState ( isOptionDisabled ) ;
117118
@@ -282,15 +283,15 @@ function OptionRow({
282283 { ! isSelected && option . brickRoadIndicator === CONST . BRICK_ROAD_INDICATOR_STATUS . ERROR && (
283284 < View style = { [ styles . alignItemsCenter , styles . justifyContentCenter ] } >
284285 < Icon
285- src = { Expensicons . DotIndicator }
286+ src = { icons . DotIndicator }
286287 fill = { theme . danger }
287288 />
288289 </ View >
289290 ) }
290291 { ! isSelected && option . brickRoadIndicator === CONST . BRICK_ROAD_INDICATOR_STATUS . INFO && (
291292 < View style = { [ styles . alignItemsCenter , styles . justifyContentCenter ] } >
292293 < Icon
293- src = { Expensicons . DotIndicator }
294+ src = { icons . DotIndicator }
294295 fill = { theme . iconSuccessFill }
295296 />
296297 </ View >
@@ -321,7 +322,7 @@ function OptionRow({
321322 { isSelected && highlightSelected && (
322323 < View style = { styles . defaultCheckmarkWrapper } >
323324 < Icon
324- src = { Expensicons . Checkmark }
325+ src = { icons . Checkmark }
325326 fill = { theme . iconSuccessFill }
326327 />
327328 </ View >
@@ -361,6 +362,7 @@ export default React.memo(
361362 prevProps . showSelectedState === nextProps . showSelectedState &&
362363 prevProps . highlightSelected === nextProps . highlightSelected &&
363364 prevProps . showTitleTooltip === nextProps . showTitleTooltip &&
365+ // eslint-disable-next-line rulesdir/no-deep-equal-in-memo -- icons array is created inline in some usages (e.g., BaseReactionList) with unstable references
364366 deepEqual ( prevProps . option . icons , nextProps . option . icons ) &&
365367 prevProps . optionIsFocused === nextProps . optionIsFocused &&
366368 prevProps . option . text === nextProps . option . text &&
@@ -373,6 +375,7 @@ export default React.memo(
373375 prevProps . option . pendingAction === nextProps . option . pendingAction &&
374376 prevProps . option . customIcon === nextProps . option . customIcon &&
375377 prevProps . option . tabIndex === nextProps . option . tabIndex &&
378+ // eslint-disable-next-line rulesdir/no-deep-equal-in-memo -- amountInputProps origin and reference stability cannot be determined across all usages
376379 deepEqual ( prevProps . option . amountInputProps , nextProps . option . amountInputProps ) ,
377380) ;
378381
0 commit comments