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.37k stars 2.29k forks source link

Error : this._callListeners is undefined #780

Open MatthieuAWAM opened 4 years ago

MatthieuAWAM commented 4 years ago

Is this a bug report, a feature request, or a question?

Bug report

Have you followed the required steps before opening a bug report?

(Check the step you've followed - put an x character between the square brackets ([]).)

Have you made sure that it wasn't a React Native bug?

Yes

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

Only try on iOS Simulator

Is the bug reproductible in a production environment (not a debug one)?

Not tried

Environment

Environment: React: 16.13.1 React native: ~0.63.3 react-native-snap-carousel: ^3.9.1

Target Platform: iOS (10.0)

Expected Behavior

Hi, I'm using React Native Snap Carousel for a projet and after proceed an upgrade of this project this error appear "_this.callListeners is undefined". I didn't see anything about this error on Github issues and globaly on Google.
Whatus certain is that when I remove the call on my application work. Can you help me please ?

This is the way that Carousel component is used : <Carousel ref={(c) => { this._carousel = c; }} data={slides} layout={'default'} renderItem={this.renderSlide} sliderWidth={slideWidth} itemWidth={slideWidth} firstItem={0} inactiveSlideScale={1} inactiveSlideOpacity={1} onSnapToItem={(index) => { !this.isCancelled && this.setState({ index_carousel : index }) }} /> .

This code worked with React 0.59 and React Native Snap Carousel 3.7.5.

Simulator Screen Shot - iPhone 8 - 2020-11-11 at 21 59 09

Thanks for your help 😄

woowalker commented 3 years ago

same on "react": "17.0.2", "react-native": "0.65.1", "react-native-snap-carousel": "^3.9.1" image

woowalker commented 3 years ago

temporary solution: node_modules\react-native\Libraries\Animated\AnimatedEvent.js annotation line 134 image

dohooo commented 3 years ago

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