Android, Jetpack Compose, Navigation, Type Safety, Kotlin.
simplify our navigation code: composable<BookDetail>( typeMap = BookDetail.typeMap ) { BookDetailScreen(modifier = modifier) } And now, in our ViewModel, we retrieve the navigation-args: private val bookDetail = BookDetail.from(savedStateHandle) private val _book = MutableStateFlow(bookDetail.book)