-
-
Notifications
You must be signed in to change notification settings - Fork 353
Description
I'm experiencing a noticeable delay in rendering items on Android when using the component — even with the default mode. On iOS, the items render immediately and smoothly. This issue occurs regardless of the carousel mode (e.g., default, horizontal-stack, etc.).
`<Carousel
ref={ref}
defaultIndex={1}
autoPlay={true}
autoPlayInterval={5000}
snapEnabled={true}
pagingEnabled={true}
data={property}
windowSize={1}
onProgressChange={progress}
defaultScrollOffsetValue={scrollOffsetValue}
onConfigurePanGesture={gesture =>
gesture.activeOffsetX([-20, 20])
}
onSnapToItem={index => setActiveIndex(index + 1)}
customConfig={() => ({ type: 'positive', viewCount: 3 })}
renderItem={_renderItem}
/>
const _renderItem = useCallback(
({ item }: { item: PropertyDetailsData }) => {
return <View style={{ backgroundColor: 'blue', height: 100 }} />;
},
[]
);`
Actual Behavior:
iOS: Fast and smooth rendering as expected.
Android: Initial render is delayed, showing a blank space or causing noticeable lag before items appear.
Environment Info:
Carousel library: [please specify exact package name and version, e.g., react-native-reanimated-carousel@4.0.2]
React Native version: [e.g., 0.77.1]
Platforms tested: Android (issue), iOS (working fine)
Troubleshooting Tried:
Verified renderItem is memoized via useCallback.
Tried adjusting windowSize, pagingEnabled, and mode.
Issue persists across different carousel modes and even minimal render logic.