Skip to content

Example of navigator bug when enableGestures is false, you start on card 1, and go to card 0.

License

Notifications You must be signed in to change notification settings

bendman/rn-navigator-bug

Repository files navigation

NavigationExperimental Bug

When using NavigationExperimental.CardStack with enableGestures={false}, the first transition always ends by rendering the last card, regardless of the target.

example animation

Expected:

  1. Render a CardStack with two cards, 0 and 1, starting on 1
  2. Trigger a transition to card 0
  3. Card 0 is animated into frame
  4. After animation, card 0 is shown

Actual:

  1. Render a CardStack with two cards, 0 and 1, starting on 1
  2. Trigger a transition to card 0
  3. Card 0 is animated into frame
  4. After animation, card 1 is shown

Code to reproduce:

The code to reproduce the issue can be found in Example/index.js, but the main culprit seems to be the enableGestures props in the code below:

<NavigationExperimental.CardStack
  enableGestures={false}
  navigationState={this.state}
  renderScene={this.renderScene}
/>

This might be due to a bug in the native animation, which is only available if enableGestures is false.

About

Example of navigator bug when enableGestures is false, you start on card 1, and go to card 0.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published