title: React Native error: Element type is invalid: expected a string or a class/function but got: object
body: <p>I am getting this error and I am having a lot of trouble fixing this.</p>
  
  <p>What I am trying to do here is have 3 different screens and have a tabbar that navigates to each screen.</p>
  
  <p>Here is my index:</p>
  
  <pre><code>import React, { Component } from 'react';
  import { AppRegistry, Navigator, StyleSheet, View, Text } from 'react-native';
  
  import Nav from './app/components/Nav';
  import Screen from './app/Screen';
  
  import Tabs from 'react-native-tabs'
  
  import SwitchView from './SwitchView';
  
  class Proj extends Component {
  
  constructor(props){
      super(props);
  }
  
  render(){
      var x = "FeedView";
      return(
  
            &lt;View style={styles.container}&gt;
              &lt;Tabs selected={x} style={{backgroundColor:'white'}}
                    selectedStyle={{color:'red'}} onSelect={el=&gt; {x = el.props.name}}&gt;
                  &lt;Text name="FeedView"&gt;First&lt;/Text&gt;
                  &lt;Text name="WikiView" selectedIconStyle={{borderTopWidth:2,borderTopColor:'red'}}&gt;Second&lt;/Text&gt;
                  &lt;Text name="BoardView"&gt;Third&lt;/Text&gt;
              &lt;/Tabs&gt;
  
              &lt;SwitchView id={x}/&gt;
  
            &lt;/View&gt;
      );
  }
  }
  
  const styles = StyleSheet.create({
  container: {
  flex: 1,
  justifyContent: 'center',
  alignItems: 'center',
  backgroundColor: '#F5FCFF',
  },
  welcome: {
  fontSize: 20,
  textAlign: 'center',
  margin: 10,
  },
  instructions: {
  textAlign: 'center',
  color: '#333333',
  marginBottom: 5,
  },
  })
  
  AppRegistry.registerComponent('Proj', () =&gt; Proj);
  </code></pre>
  
  <p>here is my SwitchView:</p>
  
  <pre><code>import Feed from './app/pages/Feed/Feed';
  import Board from './app/pages/Board';
  import Wiki from './app/pages/Wiki';
  
  class SwitchView extends Component {
  render(){
      var { id } = this.props;
  
      switch (id) {
          case "FeedView":
              return &lt;Feed/&gt;
          case "WikiView":
              return &lt;Wiki/&gt;
          case "BoardView":
              return &lt;Board/&gt;
      }
  }
  }
  </code></pre>