No More Fragments

Compose Navigation swaps Composables, not Fragments. This greatly simplifies the lifecycle. You only have the Activity lifecycle to worry about.

Setup NavHost

The NavHost allows you to define your graph. composable("home") { HomeScreen() }. Keep this simple.

Route Structure

Don't use hardcoded strings everywhere. Create a sealed class Screen(val route: String) to manage your routes type-safely.

Passing Arguments

Arguments are passed in the URL: "details/{id}". Primitive types only! Don't pass huge Parcelables. Pass the ID and fetch data in the detail screen.

Deep Links

Add deepLinks parameter to your composable definition. Compose handles the intent parsing automatically.

Nested Graphs

Group related screens (e.g., Login, Signup, ForgotPassword) into a navigation builder block to modularize your graph.

Transitions

Use AnimatedNavHost (from Accompanist or native) to add slide-in/slide-out transitions between screens.