Naffets
Naffets

Reputation: 179

React Native disable navigation push animation

Considering a simple example in React Native that uses React Navigation to go to a different screen, how can I disable the transition animation?

<Button
  title="Go to Details... again"
  onPress={() => navigation.push('Details')}
/>

See the example on Snack

Upvotes: 0

Views: 4604

Answers (2)

YaNuSH
YaNuSH

Reputation: 1097

have you tried setting "animationEnabled: false"?

check out the docs for it here:

https://reactnavigation.org/docs/en/stack-navigator.html#animationenabled

Upvotes: 0

AbdoHema2016
AbdoHema2016

Reputation: 21

set animationEnabled to false

screen: YourScreenName,
    navigationOptions: ({ navigation }) => ({
      animationEnabled: false,
    }

Upvotes: 0

Related Questions