Hey guys, anyone has experienced a weird issue (I’...
# koin-contributors
l
Hey guys, anyone has experienced a weird issue (I’m hoping my setup is wrong) that when I have a backstack of screens using compose navigation, that the viewmodel that is in the backstack still observes the flows? I know that I can solve it using DisposableEffect but that is not exactly what I want to have there. In my app, I am using
KoinContext()
as a wrapper function for my main composable and then in the
Application
class (android) I’m calling the multiplatform
startKoin
method. Any ideas as to what might be happening?
a
Did you tried with the
KoinAndroidContext
it binds on current Android context more than the default Koin context
l
Yes, didn’t work for me. But I guess that was the expected behaviour since when I disabled it (using some handy function that makes it recreate the viewmodel on dispose) it broke the functionality of the app, so I guess this is solved kinda
a
apparently