title: Is the navigation graph obsolete when I use Jetpack Compose Navigation?
body: <p>Before I use a navigation graph in my Android Studio project, just like the <a href="https://developer.android.com/guide/navigation/navigation-getting-started" rel="nofollow noreferrer">article</a> says.</p>
  <p>I use an xml file located in <code>res\navigation</code> folder to include all my different destinations.</p>
  <p>At present, I'm learning Jetpack Compose Navigation by the <a href="https://developer.android.com/codelabs/jetpack-compose-navigation" rel="nofollow noreferrer">article</a>.</p>
  <p>Code A is from the official sample <a href="https://github.com/googlecodelabs/android-compose-codelabs/tree/main/NavigationCodelab" rel="nofollow noreferrer">project</a> mentioned in the above article.</p>
  <p>It seems that Jetpack Compose Navigation use Code A and other codes to navigate, and I can't find any XML file in <code>res\navigation</code> folder.</p>
  <p>1: Is the navigation graph obsoleted when I use Jetpack Compose Navigation ?</p>
  <p>2: Don't I need to use the navigation graph located in <code>res\navigation</code> folder again when I use Jetpack Compose Navigation?</p>
  <p><strong>Code A</strong></p>
  <pre><code>@Composable
  fun RallyNavHost(navController: NavHostController, modifier: Modifier = Modifier) {
      NavHost(
          navController = navController,
          startDestination = Overview.name,
          modifier = modifier
      ) {
          composable(Overview.name) {
              OverviewBody(
                  onClickSeeAllAccounts = { navController.navigate(Accounts.name) },
                  onClickSeeAllBills = { navController.navigate(Bills.name) },
                  onAccountClick = { name -&gt;
                      navigateToSingleAccount(navController, name)
                  },
              )
          }
          composable(Accounts.name) {
              AccountsBody(accounts = UserData.accounts) { name -&gt;
                  navigateToSingleAccount(navController = navController, accountName = name)
              }
          }
          composable(Bills.name) {
              BillsBody(bills = UserData.bills)
          }
          ...
      }
  }
  </code></pre>