React Native error: Element type is invalid: expected a string or a class/function but got: object

后端 未结 9 762
不知归路
不知归路 2020-12-28 13:39

I am getting this error and I am having a lot of trouble fixing this.

What I am trying to do here is have 3 different screens and have a tabbar that navigates to eac

9条回答
  •  [愿得一人]
    2020-12-28 14:16

    Modify your SwitchView to this:

    import Feed from './app/pages/Feed/Feed';
    import Board from './app/pages/Board';
    import Wiki from './app/pages/Wiki';
    export default class SwitchView extends Component {
    render(){
        var { id } = this.props;
    
        switch (id) {
            case "FeedView":
                return 
            case "WikiView":
                return 
            case "BoardView":
                return 
        }
    }
    }
    

提交回复
热议问题