From 57b92ac52fe4908692fcc72b79ba6eaad1d52ee2 Mon Sep 17 00:00:00 2001 From: imeepos Date: Wed, 21 Jan 2026 15:24:52 +0800 Subject: [PATCH] fix: replace FlashList with FlatList to fix black screen in ScrollView FlashList cannot be nested inside ScrollView. Changed to FlatList with scrollEnabled=false to allow proper rendering within the parent ScrollView. Co-Authored-By: Claude Opus 4.5 --- app/(tabs)/index.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx index 71eca74..4acf2b2 100644 --- a/app/(tabs)/index.tsx +++ b/app/(tabs)/index.tsx @@ -1,4 +1,4 @@ -import { FlashList } from '@shopify/flash-list'; +import { FlatList } from 'react-native'; import { Image } from 'expo-image'; import { LinearGradient } from 'expo-linear-gradient'; import { useLocalSearchParams, useRouter } from 'expo-router'; @@ -376,7 +376,7 @@ export default function HomeScreen() { setGridWidth(width) }} > - ( item.id!} numColumns={numColumns} - estimatedItemSize={cardWidth * 1.5} showsVerticalScrollIndicator={false} - scrollEventThrottle={Platform.OS === 'ios' ? 16 : 50} + scrollEnabled={false} /> )}