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

Carousel randomly does not show item

Open maioradv opened this issue 1 year ago • 12 comments

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.

maioradv avatar Oct 26 '23 10:10 maioradv

Hi @maioradv , I'm looking for this problem and provide you a solution. thanks for sharing

oliverloops avatar Oct 30 '23 17:10 oliverloops

same here

mehthabt avatar Nov 03 '23 15:11 mehthabt

@oliverloops have you got the chance to look into it ?

mehthabt avatar Nov 06 '23 05:11 mehthabt

@oliverloops Sorry, its working fine with me, its my mistake in code

mehthabt avatar Nov 10 '23 15:11 mehthabt

I noticed that i have images in data props but i cant console.log in renderItem, seems like it doesnt render the item

maioradv avatar Nov 15 '23 10:11 maioradv

me too @maioradv Do you have any good solutions?

mzyisbest avatar Nov 23 '23 08:11 mzyisbest

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 avatar Nov 23 '23 16:11 maioradv

@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.

mzyisbest avatar Nov 24 '23 06:11 mzyisbest

@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.

mzyisbest avatar Nov 24 '23 10:11 mzyisbest

i updated the version at 3.6.0 seems to be solved for now

maioradv avatar Dec 06 '23 10:12 maioradv

Could you try the latest version of alpha?

npm install react-native-reanimated-carousel@alpha

dohooo avatar Dec 06 '23 11:12 dohooo

I'm seeing this as well, same result on alpha @dohooo

awilson9 avatar May 08 '24 03:05 awilson9