Skip to content

Carousel moves frantically while swiping left/right [v 4.0.2] #794

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

Open
robert-dominguez-dev opened this issue Mar 18, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@robert-dominguez-dev
Copy link

robert-dominguez-dev commented Mar 18, 2025

Describe the bug
When swiping left/right, the carousel moves frantically, it is very difficult to get to the second item, for example, because the carousel moves immediately to the end even with minimal swiping (in the video we really try to swipe left/right very slowly and carefully).
With pagingEnabled it works fine, but on the simulator the carousel gets stuck on the first item and you can't move to any other item, and we also don't want to always enable paging.

To Reproduce
Steps to reproduce the behavior:

  1. Swipe left/right

Expected behavior
In the previous version [v 3.5.1], the carousel moves slower, it is easy to get to any item.

Versions (please complete the following information):

  • react: v18.3.1
  • react-native: v0.76.6
  • react-native-reanimated: v3.17.1
  • react-native-reanimated-carousel: v4.0.2
  • react-native-gesture-handler: v2.24.0

Smartphone (please complete the following information):

  • Device: iPhone 15 Pro Max
  • OS: 18.3.2
furious_carousel_movementsMP4.MP4
@robert-dominguez-dev robert-dominguez-dev added the bug Something isn't working label Mar 18, 2025
Copy link

dosubot bot commented Mar 18, 2025

Hello, @robert-dominguez-dev! I'm here to help you with any issues or questions you may have. If you need assistance, feel free to ask!

I found some relevant information that might help address the issue you're experiencing with the carousel moving frantically while swiping.

  1. Gesture Handling Changes: In version 4.0.0, there were significant updates to the gesture handling, including updating react-native-gesture-handler to >=2.9.0 and replacing useAnimatedGestureHandler with a new gesture handler API. These changes might affect how gestures are processed, potentially leading to the behavior you're observing [1].

  2. Swipe Sensitivity Configuration: You can customize swipe sensitivity using the maxScrollDistancePerSwipe and minScrollDistancePerSwipe properties. Adjusting these values might help control the frantic movement you're experiencing [2].

  3. Paging Behavior: The pagingEnabled property ensures that the carousel snaps to items, which might explain why it works fine when enabled. However, if the carousel gets stuck on the first item in the simulator, it could be related to how the simulator handles gestures or a specific configuration issue [3].

  4. Similar Issues: A similar issue was reported and closed, where the carousel had incorrect behavior on direction reversal. This was fixed in a commit that addressed outdated data usage after gesture completion [4].

You might want to experiment with the swipe sensitivity settings and ensure that your gesture handler configurations align with the new API introduced in version 4.0.0.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

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

2 participants