If your needs are simple, like carousel and you want to avoid adding a new dependency, use the FlatList component with the pagingEnabled property. It worked for me like charm.
@egunsoma any chance you could share a basic example using FlatList?
@mgcrea Here you are :)
The width is the screen's width as this is a horizontal list, and each item's width of the list should also be to the screen's width.
<FlatList
bounces={false}
getItemLayout={(data, index) => (
{ length: width, offset: width * index, index }
)}
showsHorizontalScrollIndicator={false}
pagingEnabled={true}
horizontal={true}
style={{ flex: 1 }}
data={...}
renderItem={...}
/>
Most helpful comment
@mgcrea Here you are :)
The width is the screen's width as this is a horizontal list, and each item's width of the list should also be to the screen's width.