title: How to implement a Drawer navigator in react native?
body: <p>Hi i 'm new to react native how to implement a drawer navigator in react native. Actually i'm following this doc </p>
  
  <p><strong>Updated:</strong></p>
  
  <p>code for home page is as follows</p>
  
  <pre><code>constructor(props){
          super(props)
          this.state= {
              icon: null
          }
      }
  
      render(){
          return(
          &lt;Container&gt;
            &lt;Header style={{backgroundColor:'pink'}} &gt;
               &lt;Button
               transparent
               onPress= {() =&gt; this.props.navigation.navigate("DrawerOpen")}&gt;
               &lt;Icon
               style= {{color: '#ffffff', fontSize:25, paddingTop:0}}
               name="bars"             
               /&gt;
               &lt;/Button&gt;
               &lt;/Header&gt;
               &lt;Content&gt;
               &lt;/Content&gt;
          &lt;/Container&gt;
          );
      }
  }
  </code></pre>
  
  <p>also </p>
  
  <p><strong>index.js</strong></p>
  
  <pre><code>import CourseListing from './CourseListing';
  import SideBar from './SideBar/SideBar';
  import {DrawerNavigator} from 'react-navigation';
  import Profile from './Profile';
  
  const MyHome =DrawerNavigator(
  {
  CourseListing: {screen: CourseListing},
  Profile: {screen: Profile},
  },
  {
      contentComponent: props =&gt; &lt;SideBar {...props} /&gt;
  }
  );
  </code></pre>
  
  <p>I'm getting this error 
  <a href="https://i.stack.imgur.com/pAZ65.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pAZ65.png" alt="DrawerNavigation"></a></p>