新建页面

1.新建文件

import React from 'react';
import { Text } from 'react-native';
export default class todayAttenScreen extends React.Component {
render() {
return <Text>我是个菜鸟</Text>
}
}

2.找到navigation下的MainTabNavigator.js文件定义

        (1) import todayAtten from '引入的文件路径';
        (2) 在export default createStackNavigator({]);中注册并初始化路由
           todayAttenScreen: {screen: todayAtten, header: null}
3.跳转
this.props.navigation.replace('todayAttenScreen')
 

相关文章:

  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
  • 2021-10-31
  • 2022-12-23
  • 2021-05-31
相关资源
相似解决方案