Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carousel randomly does not show item #484

Open
maioradv opened this issue Oct 26, 2023 · 12 comments
Open

Carousel randomly does not show item #484

maioradv opened this issue Oct 26, 2023 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@maioradv
Copy link

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 maioradv added the bug Something isn't working label Oct 26, 2023
@oliverloops
Copy link
Collaborator

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

@mehthabt
Copy link

mehthabt commented Nov 3, 2023

same here

@mehthabt
Copy link

mehthabt commented Nov 6, 2023

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

@mehthabt
Copy link

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

@maioradv
Copy link
Author

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

@mzyisbest
Copy link

me too @maioradv Do you have any good solutions?

@maioradv
Copy link
Author

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

@mzyisbest
Copy link

@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
Copy link

mzyisbest commented Nov 24, 2023

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

@maioradv
Copy link
Author

maioradv commented Dec 6, 2023

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

@dohooo
Copy link
Owner

dohooo commented Dec 6, 2023

Could you try the latest version of alpha?

npm install react-native-reanimated-carousel@alpha

@awilson9
Copy link

awilson9 commented May 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants