meliorence / meliorence/react-native-snap-carousel

autoplayInterval should reset on manually calling snapToNext

Open
#670 1 comment 1 reaction 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

Is this a bug report, a feature request, or a question?

Bug Report

Have you followed the required steps before opening a bug report?

(Check the step you've followed - put an x character between the square brackets ([]).)

Have you made sure that it wasn't a React Native bug?

Yes

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

Tested only on Android

Is the bug reproductible in a production environment (not a debug one)?

Yes

Environment

Environment:
React: 16.8.6
React native: 0.60.0
react-native-snap-carousel: 3.8.2

Target Platform:
Android: 28

Expected Behavior

On Manually calling snapToNext or snapToPrev, the autoplayInterval should reset for new page.

Actual Behavior

autoplayInterval did not reset. If the autoplayInterval is 3 sec and I called snapToNext after 2 sec then next page is shown but autoplayed to next to it after 1 sec.

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 from the public snapToNext and snapToPrev methods and trace how autoplayInterval is scheduled when a page changes. Reproduce on Android by calling one method before the interval expires, then verify that the next automatic transition waits for a full new interval. Done means both manual methods reset the autoplay timing consistently.

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.