React-native-tab-view: How to configure tabs slide transition?

Created on 16 Mar 2017  路  2Comments  路  Source: satya164/react-native-tab-view

When I set new index to state of tabview (i.e. switch tabs programatically, from a button click) tabs switch too fast for me, I'd like to have a slower transition. Docs say there's configureTransition callback, but don't say how should it be written and how does that 'transition configuration' that it should return should look like. Could you please, pour some light on it and update the docs?

Most helpful comment

@CharlesMangwa does this still work as described? For me the configureTransition prop has no effect. It doesn't get executed at all.

All 2 comments

Hi! You can use configureTransition as following:

  configureTransition={() => ({
    timing: Animated.spring,
    tension: 300,
    friction: 35,
  })}

If it can help you out, you also have TransitionConfigurator's type with Flow and you can check out how the callback is used under the hood right here :)

@CharlesMangwa does this still work as described? For me the configureTransition prop has no effect. It doesn't get executed at all.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

compojoom picture compojoom  路  4Comments

karthikeyansundaram2 picture karthikeyansundaram2  路  3Comments

QuentinBrosse picture QuentinBrosse  路  4Comments

ios-dev-newbie picture ios-dev-newbie  路  3Comments

AndriiUhryn picture AndriiUhryn  路  3Comments