Android, Jetpack Compose, Navigation, Type Safety, Kotlin.
@Serializable so let’s fix it: @Serializable data class Book(val id: Int, val title: String) We also have to change a couple of things in the TypeSafetyNavigation component. Now we pass the whole book: onBookClick = { navController.navigate(BookDetail(it)) }, And change the BookDetail navigation: