React-native-router-flux: remove animation on back/close transition with duration={1} (NOT working)

Created on 17 Mar 2017  路  4Comments  路  Source: aksonov/react-native-router-flux

Version

Tell us which versions you are using:

  • react-native-router-flux v3.38.0
  • react-native v0.42.0

Expected behaviour

Setting duration={1} to a <Scene /> performs as expected on open (i.e. immediately) and should perform identical on close/back.

Actual behaviour

However on close/back, the duration is ignored and the animation still persists.

Steps to reproduce

  1. Add duration={1} to a <Scene />
  2. Call action navigation to that scene.
  3. Call action.pop() to go back.

Any idea on how to make the close/back act immediately instead of animated?
Thanks,

Most helpful comment

I added duration={0} to the scene I'm going back to and that worked.

All 4 comments

So the exit animation does not listen to the 1 second duration set on the scene?

No it doesn't. It completely ignores and animate with the default delay.
I couldn't find where this is set in the code.

Same problem.
I add duration={0} to Scene, and when pop() still animated.

I added duration={0} to the scene I'm going back to and that worked.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maphongba008 picture maphongba008  路  3Comments

VictorK1902 picture VictorK1902  路  3Comments

booboothefool picture booboothefool  路  3Comments

rafaelcorreiapoli picture rafaelcorreiapoli  路  3Comments

vinayr picture vinayr  路  3Comments