RN使用react-native

最新版导航栏代码

const navPart = {

  headerStyle: {
    backgroundColor: Keys.navColor,
  },
  headerTintColor: Keys.titleTextColor,
  headerTitleStyle: {
    fontSize: 18,
  },
}


const NewTab = createStackNavigator({
     Home: {
       screen: MainJS,
       navigationOptions: navPart,
     },
      Datajs: {
        screen: DataJS,
        navigationOptions: navPart,
      },
      Setjs: {
        screen: SetJS,
        navigationOptions: navPart,
      },

},
    {
      initialRouteName: 'Home',
    }
);


const AppNew = createAppContainer(NewTab);

你可能感兴趣的:(RN使用react-native)