Android, Navigation Component, Jetpack Compose, Kotlin, AndroidDev.
startDestination = Home) { composable<Home> { HomeScreen(onNavigateToProfile = { profile -> navController.navigate(profile) }) } composable<Profile> { backStackEntry -> val profile: Profile = backStackEntry.toRoute() ProfileScreen(profile) } } Conclusion Type-safe navigation in Jetpack Compose