meliorence / meliorence/react-native-snap-carousel

Infinite rendering problem when loop={true} && loopClonesPerSide={4} && data.length === 2

Open
#653 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Description

This is a bug report, reproducible both on Android and iOS.

When loop={true} and loopClonesPerSide={4}, it triggers infinite rendering problem when the data length is exactly equal to 2.

I did not observe this behavior on any other values of the above parameters.

Library Version

"react-native-snap-carousel": "3.8.4"

React-native Info

System:
OS: macOS 10.15.3
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Memory: 125.14 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 11.13.0 - ~/.nvm/versions/node/v11.13.0/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.11.2 - ~/.nvm/versions/node/v11.13.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
Android NDK: 21.0.6113669
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
react-native: 0.61.5 => 0.61.5
npmGlobalPackages:
react-native-cli: 2.0.1

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

Reproduce the issue with react-native-snap-carousel 3.8.4 on both Android and iOS using loop={true}, loopClonesPerSide={4}, and exactly two data items. Trace the carousel implementation from this configuration and identify where rendering fails to terminate. Done means the two-item configuration renders without an infinite rendering loop while preserving existing loop behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.