【发布时间】:2020-05-05 10:56:35
【问题描述】:
伙计们 我想用
配置标题static navigationOptions = ({ navigation }) => {
}
我使用反应导航 v5 告诉我,我理解正确,现在可以仅使用 Stack.Screen 中的选项来获取标题设置? 示例:
<Stack.Screen
name="Home"
component={HomeScreen}
options={{
title: 'My home',
headerStyle: {
backgroundColor: '#f4511e',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
}}
/>
</Stack.Navigator>
【问题讨论】:
标签: react-native react-navigation react-navigation-v5