kkemple / kkemple/react-native-sideswipe

Offset is ignored on first render when currentIndex != 0

Open
#56 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
900
Forks
69
PR merge metrics
No merged PRs in 30d

Description

When I set the currentIndex = 1, the offset is not applied until the sideswipe is interacted with. Setting the currentIndex = 0 works correctly.

First load (incorrect):
![first-load](https://user-images.githubusercontent.com/10884263/58713133-faa21900-838f-11e9-8c6e-b8fafed62085.png)

After Interaction (correct):
![after-interaction](https://user-images.githubusercontent.com/10884263/58713134-faa21900-838f-11e9-9d1d-2ec9ac9b028d.png)

Thank you!

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the first-render case with currentIndex set to 1 and an offset, then inspect the initial render path in the carousel component. Compare it with the state update triggered by sideswipe interaction; done means the offset is applied on the first render without requiring interaction.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.