leecade / leecade/react-native-swiper

Navigation forward and back onPress event?

Open
#721 0 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

iOS emulator - 11.2
Version

Which versions are you using:

Expected behaviour

I am currently using this for an onBoarding tour of an app. I use onIndexChanged to show/hide buttons for closing or skipping the swiper.

onIndexChanged={(index) => {
    this.setState({ showTourNav: index !== 3, showDoneButton: index === 3, showSkipButton: index === 0 });
}}
Actual behaviour

The problem with this approach is that the buttons don't show or hide until after the index changes. For example, on the first slide, I have skip button - you still see the skip button during the swipe animation before it disappears on the next slide. What I need is an event that fires immediately on the next and previous buttons in the nav, but I don't see anything in the docs.

How to reproduce it
Steps to reproduce

Contributor guide

No contributing guide indexed for this repository

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 reading the react-native-swiper navigation and onIndexChanged behavior described in the issue, then reproduce it with the listed react-native-swiper 1.5.13 and React Native SDK 25 versions on the iOS emulator. Trace when the next and previous navigation actions occur relative to the swipe animation. Done means an event is available at navigation-button press time so onboarding controls can update before the index changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Feature
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.