react-native-snap-carousel icon indicating copy to clipboard operation
react-native-snap-carousel copied to clipboard

TypeError: undefined is not an object (evaluating 'items.forEach')

Open tinydiv333 opened this issue 3 years ago • 5 comments

After setting project in ios my code throws this error "TypeError: undefined is not an object (evaluating 'items.forEach') "

tinydiv333 avatar Jun 03 '21 12:06 tinydiv333

@tinydiv333 Sorry, please allow me to advertise for my open source library! ~ I think this library react-native-reanimated-carousel will solve your problem. It is a high performance and very simple component, complete with React-Native reanimated 2

dohooo avatar Oct 08 '21 04:10 dohooo

Excuse me. Do you have solution for this issue?

rubendario2567 avatar Feb 21 '22 23:02 rubendario2567

provided value might be a string... JSON.parse(your_string) once

vishkashpvp avatar Jul 25 '22 05:07 vishkashpvp

Any solution for this?

My code:<Carousel data={items} renderItem={({item}: any) => <CarouselCard item={item} />} sliderWidth={SliderWidth} itemWidth={300} />

items is a plain array of objects. If I set a string (JSON.stringfy(items)) it doesn't work... data needs a plain array. Although the error seems to be coming from the renderItem property.

DidacC91 avatar Aug 28 '22 17:08 DidacC91

It seems to be a recent issue. I am having the same error. Any solution please?

Enaturale avatar Sep 24 '22 13:09 Enaturale