react-native-reanimated-carousel
react-native-reanimated-carousel copied to clipboard
Carousel randomly does not show item
Sometimes carousel seems not to show items until you swipe to change item. There's an example of the problem: https://d35vozid5pezr8.cloudfront.net/temp/Screen_Recording_20231025_000642_app-cms.gif
There's the code: https://d35vozid5pezr8.cloudfront.net/temp/Immagine 2023-10-26 120318.png
Versions:
- react: v18.2.0
- react-native: v0.72.6
- react-native-reanimated: v3.3.0
- react-native-reanimated-carousel: v3.5.1
- react-native-gesture-handler: v2.12.1
Smartphone:
- Simulator (Android)
- Device (Android)
When the problem happens also a carousel in home of our app stop to autoplay alone. This happens only when you start the app if doesn't happen the problem doesnt show up.
Hi @maioradv , I'm looking for this problem and provide you a solution. thanks for sharing
same here
@oliverloops have you got the chance to look into it ?
@oliverloops Sorry, its working fine with me, its my mistake in code
I noticed that i have images in data props but i cant console.log in renderItem, seems like it doesnt render the item
me too @maioradv Do you have any good solutions?
nope i can't figure out why is doing this problem... do u have images on a server online or offline? because in my case they're online but if render just the images it works perfectly
@maioradv Here is an online image. I can confirm that if I lower the react-native-reanimated version to 2.8.0 this problem will not occur. But because one of my own components requires [email protected] to solve the crash.
@maioradv The simple and crude way is to comment out in react-native-reanimated-carousel/src/lazyView.tsx // if (!shouldUpdate) { // return <></>; // } It may reduce some performance, but does not affect use,You can try it without modifying the react-native-reanimated version.
i updated the version at 3.6.0 seems to be solved for now
Could you try the latest version of alpha?
npm install react-native-reanimated-carousel@alpha
I'm seeing this as well, same result on alpha @dohooo