React native 在组件中定义导航栏的右按钮,而不是在场景中(react native router flux)
我在应用程序中使用React native 在组件中定义导航栏的右按钮,而不是在场景中(react native router flux),react-native,react-native-android,react-native-router-flux,React Native,React Native Android,React Native Router Flux,我在应用程序中使用react native router flux进行导航 我想在组件中定义导航栏的右按钮,而不是在场景中,我应该怎么做 以下是场景的代码: <Scene navBar={PlatformNavbar} leftElement={ <Text style={{color: Colors.white, marginLeft: 25, fontWeight:'500' }}>Go Back</Text> }
react native router flux
进行导航
我想在组件中定义导航栏
的右按钮,而不是在场景
中,我应该怎么做
以下是场景的代码
:
<Scene
navBar={PlatformNavbar}
leftElement={ <Text style={{color: Colors.white, marginLeft: 25, fontWeight:'500' }}>Go Back</Text> }
key='nodScreen'
component={NodScreen}
hideNavBar={false}
/>
您是否尝试过使用
right
而不是righelement
componentDidMount() {
Actions.refresh({
right : this.renderRightElement,
})
}
查看RNRF页面了解更多详细信息
componentDidMount() {
Actions.refresh({
right : this.renderRightElement,
})
}