title: react native: How do I create a side menu with navigation between views using DrawerLayoutAndroid
body: <p>I'm new to React Native and I'm trying to create a side menu with navigation using DrawerLayoutAndroid. I've looked this up but haven't really found anything helpful. Here's what I have for now: </p>
  
  <pre><code>'use strict';
  
  var React = require('react-native');
  var {
    AppRegistry,
    DrawerLayoutAndroid,
    StyleSheet,
    TouchableHighlight,
    Text,
    Navigator,
    View,
    Image
  } = React;
  var ContentView = React.createClass({
    render() {
      return(
        &lt;View&gt;
          &lt;Text style={styles.contentStyle}&gt;Hello&lt;/Text&gt;
        &lt;/View&gt;
        );
    }
  });
  var Test = React.createClass({
    openD() {
      this.refs['DRAWER'].openDrawer();
    },
    render() {
      var navigationView = (
        &lt;View style={styles.contentStyle}&gt;
          &lt;Text&gt;First View&lt;/Text&gt;
          &lt;Text&gt;Second View&lt;/Text&gt;
          &lt;Text&gt;Third View&lt;/Text&gt;
        &lt;/View&gt;
      );
  
      return (
        &lt;DrawerLayoutAndroid
          drawerWidth={300}
          drawerPosition={DrawerLayoutAndroid.positions.Left}
          ref={'DRAWER'}
          renderNavigationView={() =&gt; navigationView}&gt;
          &lt;View style={{flex: 1, backgroundColor: 'white'}}&gt;
            &lt;TouchableHighlight onPress={this.openD} underlayColor='transparent'&gt;
              &lt;Image 
              source={{uri:'https://cdn4.iconfinder.com/data/icons/wirecons-free-vector-icons/32/menu-alt-512.png'}} 
              style={styles.img}/&gt;
            &lt;/TouchableHighlight&gt;
            &lt;ContentView/&gt;
          &lt;/View&gt;
        &lt;/DrawerLayoutAndroid&gt;
      );
    }
  });
  </code></pre>
  
  <p>And what it looks like: 
  <a href="http://i.stack.imgur.com/4EIQM.png" rel="nofollow">Main View</a></p>
  
  <p><a href="http://i.stack.imgur.com/oRMLi.png" rel="nofollow">Drawer</a></p>
  
  <p>I'm asking for a simple example of adding navigation to this code so it could switch between views. Thanks in advance and sorry for such noob questions. </p>