title: react-navigation pass props to a class component
body: <p>Assume I have the following code snippet to create a <code>DrawerNavigator</code></p>
  
  <pre><code>export const DrawerApp = DrawerNavigator({
      PageHome: {
          screen: InboxScreen
      },
  },
  {
      contentComponent: props =&gt; &lt;RightMenuScreen /&gt;,
      drawerPosition: 'right'
  });
  </code></pre>
  
  <p>I read from sample <a href="https://github.com/react-community/react-navigation/blob/master/examples/NavigationPlayground/js/Drawer.js" rel="nofollow noreferrer">here</a> that I can pass props like a <code>banner</code> prop to a functional component using syntax like </p>
  
  <pre><code>const MyNavScreen = ({ navigation, banner }) =&gt; (&lt;View&gt;&lt;Text&gt;{banner}&lt;/Text&gt;&lt;/View&gt;);
  // ...
  // ...
  // ...
  const InboxScreen = ({ navigation }) =&gt; (
      &lt;MyNavScreen banner={'InboxScreen'} navigation={navigation} /&gt;
  );
  </code></pre>
  
  <p>But what if I declare my Component using class Component, how do I archive the same behaviour of passing my custom prop to the <code>MyNavScreen</code></p>
  
  <pre><code>class InboxScreen extends Component {
  
      render() {
          // here I want to get a prop like `banner` or `callback` from props
      }
  }
  </code></pre>