meliorence / meliorence/react-native-snap-carousel

Snapping between items is very jerky

Open
#189 30 comments 19 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

* enhancement help wanted react-native bug
Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Hi guys,

I've searched around a lot and haven't found any information about this, but even the simplest of tests with the carousel I find are very jerky.

When swiping between items in the carousel, I notice that as soon as I release my finger, the speed of the snap changes. This means when I quickly flick to the next item, it instantly slows the snap speed so it looks like the swipe "hit a wall."

I'm tested this using Expo on an iPhone 7.

I've compared this to the native ScrollView with pagingEnabled or even snapToInterval and that has a much smoother effect.

Is this purely because the "snapping" action can't work out how much force a user swiped with? Or am I completely missing something?

I can probably put together an Expo snack to demonstrate the issue if need be.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the jerky snap on the carousel in Expo on an iPhone 7, comparing it with React Native ScrollView using pagingEnabled or snapToInterval. An Expo Snack demonstrating the behavior is not included, so first isolate a minimal reproduction and then identify what change would make flick velocity carry smoothly into snapping; done means the snap no longer appears to hit a wall.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.