Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Install and migrate to Jetpack Navigation 3. Use when implementing Navigation 3 patterns including NavDisplay, NavKey routes, deep links, multiple backstacks, scenes (dialogs, bottom sheets), or migrating from Navigation 2.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | -25% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -29% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -25% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 6% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -26% | 0% |
Guide for implementing and migrating to Navigation 3 in Jetpack Compose.
Navigation 3 replaces the previous NavHost/NavController pattern with a simpler, state-driven approach:
mutableStateListOf<Any>.NavDisplay renders the current route based on a lambda.kotlinval backStack = remember { mutableStateListOf<Any>(RouteHome) } NavDisplay( backStack = backStack, onBack = { backStack.removeLastOrNull() }, entryProvider = { key -> when (key) { is RouteHome -> NavEntry(key) { HomeScreen(onNavigate = { backStack.add(it) }) } is RouteDetail -> NavEntry(key) { DetailScreen(key.id) } else -> error("Unknown route: $key") } } )
See migration guide for step-by-step conversion from NavHost/NavController to NavDisplay.
Key changes:
NavHost with NavDisplay.NavController.navigate() with direct list manipulation.navArgument with data class properties.See recipes for code examples:
mutableStateListOf<Any>.NavDisplay handles all routes in entryProvider../gradlew build succeeds.NavDisplay with a state list.remember { navController() }: Navigation 3 doesn't use NavController.Other measured skills in the registry, with their headline benchmark lift.