:用来跳转页面和传递参数
TabNavigator:类似底部导航栏,用来在同一屏幕下切换不同界面
DrawerNavigator:侧滑菜单导航栏,用于轻松设置带抽屉导航的屏幕
该文只说前两个怎么用,就是入门...index.js
import React, { Component } from 'react';
import {
Text,
View,
Button,
StyleSheet,...TabNavigator
index.js
import React, { Component } from 'react';
import {
Text,
View,
Button,...styles.icon]}
/>
),
}
},
}, {
animationEnabled: false, // 切换页面时不显示动画...tabBarPosition: 'bottom', // 显示在底端,android 默认是显示在页面顶端的
swipeEnabled: false, // 禁止左右滑动
//