meliorence / react-native-snap-carousel

Swiper/carousel component for React Native featuring previews, multiple layouts, parallax images, performant handling of huge numbers of items, and more. Compatible with Android & iOS.
BSD 3-Clause "New" or "Revised" License
10.24k stars 2.26k forks source link

Cannot read property 'array' of undefined #983

Open Ranjit8298 opened 1 year ago

Ranjit8298 commented 1 year ago

Hill @all, Please Help me, when I am using this getting the given error. Cannot read property 'array' of undefined?

sample code: <Carousel ref={ref} layout={'default'} scrollEnabled={true} showsVerticalScrollIndicator={false} loop={true} data={carouselData} renderItem={renderItem} sliderWidth={100} itemWidth={100} firstItem={0} itemHeight={40} onSnapToItem={index => setIndex(index)} />

const carouselData = [ {id: 1, name: 'Test'}, {id: 2, name: 'Series'}, {id: 3, name: 'Cont'}, ];

Thanks

shahawi commented 1 year ago

Same issue here

patras1 commented 11 months ago

Me too getting the some error and could not find the reason, Can someone help please?

ShreyashMs commented 5 months ago

Uninstall and install react native snap carousel again.It worked for me