Moritz Post
11/18/2020, 10:19 AM@Composable
private fun configureNavigation() {
val navController = rememberNavController()
loadKoinModules(module { single<NavController> { navController } })
}
This has the disadvantage that i have to actively unload the module when the Activity is destroyed.Giorgos Neokleous
11/18/2020, 11:37 AMrememberNavController
should be enough. Internally it uses compose's remember
https://developer.android.com/jetpack/compose/navigation#getting-startedMoritz Post
11/18/2020, 12:05 PMMoritz Post
11/18/2020, 12:13 PMGiorgos Neokleous
11/18/2020, 12:50 PMGiorgos Neokleous
11/18/2020, 12:51 PMYou should create theFrom the link I've sent. I don't think there is a reason to injected with Koin. You can pass it as a method argumentin the place in your composable hierarchy where all composables that need to reference it have access to it.NavController
Moritz Post
11/19/2020, 9:05 AMMoritz Post
11/19/2020, 9:05 AM