title: Jetpack Compose: Nested navigation with bottom bar navigation in a nested route
body: <p>My app has the following structure and because Route B has a own bottom navigation bar and thus an own NavHost, how can I navigate from Screen C (opened from the tab bar) to Route A?</p>
  <pre><code> - Nested Route &quot;/onboarding_route&quot;, startDestination = 'start' 
       - route 'start' -&gt; Screen 'Login' (Composable)
       - route 'legal' -&gt; Screen 'Legal' (Composable)
  
  - Nested Route &quot;/login_route&quot;, startDestination = 'login' 
       - route 'login' -&gt; Screen 'Login' (Composable)
       - route 'register' -&gt; Screen 'Register' (composable)
       - route 'recover' -&gt; Screen 'Recover' (composable)
  
  - Nested Route '/main_app', startDestination 'dashboard' =&gt; with bottom navigation
       - route 'dashboard' -&gt; Screen 'Dashboard' (composable)
       - route 'product' -&gt; Screen 'Product' (composable)
       - route 'profile' -&gt; Screen 'Profile'
       
  </code></pre>
  <p>The navigating to the route 'main_app' should display the bottom bar navigation with three NavigationItems. I could do this with a scaffold with a bottom bar in each screen (Dashboard, Product, Profile) or I can add a MainView Screen on top, which holds the scaffold with the bottom bar:</p>
  <pre><code> - Nested Route '/main_app', startDestination 'mainVie/dashboard' =&gt; with bottom navigation
       - route 'mainView/{tabname} =&gt; Screen 'MainView' with Scaffold &amp; bottom bar
            - route 'dashboard' -&gt; Screen 'Dashboard' (composable)
            - route 'product' -&gt; Screen 'Product' (composable)
            - route 'profile' -&gt; Screen 'Profile'
  </code></pre>
  <p>If I work with this solution I have the following problem: Within the screens 'Dashboard', &quot;Product' and 'Profile' I only have the navigation controller from the BottomBar and I can't navigatate to top routes like 'login_route'.</p>
  <p>I think this is quite common scenario: You have an onboarding screen, login / registration screens and they all without a bottom bar. Once you are in the main screen you want to have displayed a bottom bar and then you probably want to go back to the login screen from one of the screen. If the whole navigations is seperated in nested navigation routes (as Google recommends) I don't know how to navigate from a nested screen back to one of the top routes.</p>
  <p>What are the best practices to have proper and clean navigation structure?</p>