小编Mah*_*aey的帖子

react-navigation tab navigator 屏幕的内容没有显示/屏幕是空白的问题

我对 react-navigation 选项卡导航器有问题。屏幕内容未显示/屏幕为空白。有任何想法吗 ?这是我的导航器结构:

import { StackNavigator, TabNavigator } from 'react-navigation';
import PeopleList from './PeopleList';
import CompanyList from './CompanyList';
import AddPerson from './AddPerson';
const Navigation = TabNavigator({
  People: { screen: PeopleList },
  Person: { screen: AddPerson },
  Company: { screen: CompanyList },
 }, {
 tabBarOptions: {
  activeTintColor: 'white',
  inactiveTintColor: '#80cbc4',
  swipeEnabled: true,
  showLabel: false,
  style: {
    backgroundColor: '#26a69a',
  },
 },
});
export default Navigation;
Run Code Online (Sandbox Code Playgroud)

更新:

这是包含渲染方法的 App.js 文件:

    import React, {Component} from 'react';
    import {StyleSheet, Text, View} from 'react-native';
    import …
Run Code Online (Sandbox Code Playgroud)

tabnavigator react-native react-native-navigation

3
推荐指数
1
解决办法
1720
查看次数