File tree Expand file tree Collapse file tree
packages/example/src/modules/program/view Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,9 +11,10 @@ type ProgramProps = {
1111 label ?: string ;
1212} ;
1313
14- const Label = ( { label } : { label : string } ) => {
14+ const Label = React . memo ( ( { label } : { label : string } ) => {
1515 return < Typography > { label } </ Typography > ;
16- } ;
16+ } ) ;
17+ Label . displayName = 'Label' ;
1718
1819export const Program = React . forwardRef < View , ProgramProps > (
1920 ( { isFocused = false , programInfo, label } , ref ) => {
@@ -50,13 +51,17 @@ const ProgramContainer = styled(Animated.View)<{ isFocused: boolean }>(({ isFocu
5051 cursor : 'pointer' ,
5152} ) ) ;
5253
53- const ProgramImage = styled ( Image ) ( {
54- height : '100%' ,
55- width : '100%' ,
56- } ) ;
54+ const ProgramImage = React . memo (
55+ styled ( Image ) ( {
56+ height : '100%' ,
57+ width : '100%' ,
58+ } ) ,
59+ ) ;
5760
58- const Overlay = styled . View ( {
59- position : 'absolute' ,
60- bottom : 12 ,
61- left : 12 ,
62- } ) ;
61+ const Overlay = React . memo (
62+ styled . View ( {
63+ position : 'absolute' ,
64+ bottom : 12 ,
65+ left : 12 ,
66+ } ) ,
67+ ) ;
You can’t perform that action at this time.
0 commit comments