我正在使用本机反应,我想在选项卡中调用函数
import {createBottomTabNavigator} from 'react-navigation-tabs';
const TabNavigator = createBottomTabNavigator(
{
Home:{
screen:CustomMapView,navigationOptions:{
tabBarLabel:'Home',tabBarIcon:({tintColor})=>(
<Image source = {require("../../Images/react-logo.png")} style={{width : 30,height:30}}/>
)
}
},Profile11:{
screen:Profile11,navigationOptions:{
tabBarLabel:'Profile11',Profile: {
screen:ProfileScreen,navigationOptions:{
tabBarLabel:'Profile',tabBarIcon:({tintColor})=>(
// <Icon name="ios-person" color={tintColor} size={25}/>
<Image source = {require("../../Images/react-logo.png")} style={{width : 30,},{
initialRouteName: "Home"
},);
我在上面使用的方法是,如果条件为true,则要在首页等选项卡上设置一些条件,如果条件为false,则将CustomMapView设置为屏幕;如果条件为false,则其他任何屏幕都将像CustomMapView.js一样设置
我该怎么做