title: React this.props.navigation.openDrawer() in child component?
body: <p>I have an openDrawer method via React Navigation 2 working great in my View. However,  when I create a child component and place my openDrawer button in it, I can no longer access this.props.navigation. How do I pass that down into the child component? I looked at state but that doesn't seem to be the correct way to address this? I am new to React/Native. Here is my button inside the main view and it works fine this way.</p>
  
  <pre><code>&lt;View style={styles.menuBar}&gt; 
  &lt;TouchableOpacity style={styles.menuButton} 
   onPress={() =&gt; this.props.navigation.openDrawer()}&gt;
  &lt;Text&gt;&amp;#9776;&lt;/Text&gt;
  &lt;/TouchableOpacity&gt;
  // Other Stuff inside menuBar.
  &lt;/View&gt;
  </code></pre>
  
  <p>This menu button has a few other items as well and I am wanting to group together in a class component as a child that I can just import into various screens. </p>
  
  <pre><code>import { topMenuBar } from '../components/menuBar';
  &lt;topMenuBar /&gt;
  </code></pre>
  
  <p>However, the menu button no longer works now. I know it's because this.props is now referring to class topMenuBar and not the original class which is part of the nav structure. But I don't know the proper procedure for this step, whether it's using state or calling NavigationActions from react-navigation in the child method somehow.</p>
  
  <p>Thanks for the help!</p>