title: Passing navigation to BottomNavigation
body: <p>In my React Native app, I use react-navigation version 5.</p>
  <p>How do I pass the navigation object to the scenes in <code>BottomNavigation</code>?</p>
  <p>Here's the component where I create the <code>BottomNavigation</code>:</p>
  <pre><code>import React from 'react';
  import { BottomNavigation } from 'react-native-paper';
  
  // Components
  import CodeScanner from '../../../screens/vendors/CodeScannerScreen';
  import Home from '../../../screens/home/HomeScreen';
  import Vendors from '../vendors/VendorsStack';
     
  // Routes
  const homeRoute = () =&gt; &lt;Home /&gt;;
  const vendorsRoute = () =&gt; &lt;Vendors /&gt;;
  const scanRoute = () =&gt; &lt;CodeScanner /&gt;;
  
  const HomeTabs = (props) =&gt; {
     
     const [index, setIndex] = React.useState(0);
     
     const [routes] = React.useState([
        { key: 'home', title: 'Home', icon: 'newspaper-variant-multiple' },
        { key: 'vendors', title: 'Vendors', icon: 'storefront' },
        { key: 'codescanner', title: 'Scan', icon: 'qrcode-scan' }
     ]);
     
     const renderScene = BottomNavigation.SceneMap({
        home: homeRoute,
        vendors: vendorsRoute,
        codescanner: scanRoute
     });
  
     return (
        &lt;BottomNavigation
           navigationState={{ index, routes }}
           onIndexChange={setIndex}
           renderScene={renderScene}
           labeled={false} /&gt;
     );
  }
  
  export default HomeTabs;
  </code></pre>
  <p>In this code, I do have the navigation in the props but haven't been able to figure out a way to pass navigation to the screens. Please also note that the vendor one is actually a stack navigator. In particular, that's where I need access to navigation so that I can open up other screens.</p>