React native 使用React Native Navigation V2时关闭推送动画

React native 使用React Native Navigation V2时关闭推送动画,react-native,react-native-ios,react-native-navigation,wix-react-native-navigation,React Native,React Native Ios,React Native Navigation,Wix React Native Navigation,当使用RNN v2时,如何在导航时关闭动画。按下按钮 当使用V1时,尝试设置动画:false。但不适用于V2 Navigation.push(this.props.homeId, { component: { name: 'Screen2', animated: false, options: { animated: false, topBar: { title: { text: 'Pushed Screen

当使用RNN v2时,如何在导航时关闭动画。按下按钮

当使用V1时,尝试设置
动画:false
。但不适用于V2

Navigation.push(this.props.homeId, {
  component: {
    name: 'Screen2',
    animated: false,
    options: {
      animated: false,
      topBar: {
        title: {
          text: 'Pushed Screen Title'
        }
      }
    }
  }
})
}

阅读V2文档,但没有发现任何有用的内容。

根据,对于在堆栈中推送和弹出屏幕,您可以单独禁用动画,这似乎满足了您的需要

Navigation.push(this.props.componentId, {
  component: {
    name: 'Screen2',
    options: {
      topBar: {
        title: {
          text: 'Pushed Screen Title'
        }
      },
      animations: {
        push: {
          enabled: false
        }
      }
    }
  }
})