文件位置:App.js
一、导航栏
- 引进react-navigation组件,详细用法见官网:https://reactnavigation.org
yarn add --save react-navigation
react-native run-android
- 编码
1.在文件开头引进react-navigation
import { TabNavigator } from "react-navigation";
2.页面有4个tab,分别是:精选: JingxuanScreen、最新: ShipinScreen 、关注: RecentChatsScreen 、排行榜: AllContactsScreen 。而react-navigation的使用根简单,只需要把各个界面包含进来即可: