File tree Expand file tree Collapse file tree 1 file changed +5
-20
lines changed
package/src/components/MessageList Expand file tree Collapse file tree 1 file changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -1143,29 +1143,14 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
11431143 }
11441144 }
11451145
1146- const ListFooterComponent = useCallback (
1147- ( ) => (
1148- < View >
1149- < FooterComponent />
1150- </ View >
1151- ) ,
1152- [ FooterComponent ] ,
1153- ) ;
1146+ const ListFooterComponent = useCallback ( ( ) => < FooterComponent /> , [ FooterComponent ] ) ;
11541147
1155- const ListHeaderComponent = useCallback (
1156- ( ) => (
1157- < View >
1158- < HeaderComponent />
1159- </ View >
1160- ) ,
1161- [ HeaderComponent ] ,
1162- ) ;
1148+ const ListHeaderComponent = useCallback ( ( ) => < HeaderComponent /> , [ HeaderComponent ] ) ;
11631149
11641150 const ItemSeparatorComponent = additionalFlatListProps ?. ItemSeparatorComponent ;
1165- const WrappedItemSeparatorComponent = useCallback (
1166- ( ) => < View > { ItemSeparatorComponent ? < ItemSeparatorComponent /> : null } </ View > ,
1167- [ ItemSeparatorComponent ] ,
1168- ) ;
1151+ const WrappedItemSeparatorComponent = useCallback ( ( ) => {
1152+ return ItemSeparatorComponent ? < ItemSeparatorComponent /> : null ;
1153+ } , [ ItemSeparatorComponent ] ) ;
11691154
11701155 // We need to omit the style related props from the additionalFlatListProps and add them directly instead of spreading
11711156 let additionalFlatListPropsExcludingStyle :
You can’t perform that action at this time.
0 commit comments