I'm working on a FlatList component that I want to automatically scroll. Below is the current code:
<FlatList
contentContainerStyle={{}}
data={banners}
renderItem={(item) => (
<Image source={{ uri: item.item }} style={styles.image} />
)}
horizontal
showsHorizontalScrollIndicator={false}
snapToInterval={width}
snapToAlignment={'center'}
decelerationRate={'fast'}
/>
Is there a property I can use instead of setInterval for auto-scrolling? Any other ideas or suggestions?
I've looked at some older solutions, but they are outdated. I'm looking for something simpler with less code to implement.