0

一旦他们更新了他们的 API,这似乎是反应导航的一个常见问题

查看修复错误:路由“主页”的组件必须是 React 组件

组件都不想加载到这个 tabNavigator 中profilecamera有什么建议么?

相机.js

import React, { Component } from 'react';

class Camera extends Component {
    render() {
        return (
            <Text>Camera</Text>
        );
    }
}

export default Camera;

InstaClone.js

import React, { Component } from 'react'
import { View, StyleSheet} from 'react-native' 
import Camera from './components/screens'
import {MainFeed, Login, Profile} from './components/screens'
import { createBottomTabNavigator, createSwitchNavigator, createAppContainer } from 'react-navigation'

const Tabs = createBottomTabNavigator({
    feed: MainFeed,
    Camera: Camera,
    profile: Profile
});

const MainStack = createAppContainer(createSwitchNavigator({
    login: Login,
    main: Tabs
}));

const MainStack = createAppContainer(Tabs);

class InstaClone extends Component {
    render() {
        return <MainStack/>
    }
}


export default InstaClone;
4

0 回答 0