can someone help me to know is `koinInject<xx-v...
# koin
s
can someone help me to know is
koinInject<xx-viewmodel>()
is composable lifecycle aware?
we are using in KMP projects
Copy code
koin = "4.0.0"
koin-compose = "4.0.0"
s
Why do you mean lifecycle aware? and what is lifecycle aware?
koinInject
or the
ViewModel
?
s
I wanted to know if I use the koinInject within composable block will this inject viewmodel becomes lifecycle aware of the composable??.. in Kotlin multiplatform
s
viewmodel becomes lifecycle aware of the composable
ViewModel doesn’t know anything about your composable and will be attached to ViewModelStoreOwner which can be different depending on where you use this composable. For example if you use compose navigation then your NavEntry acts as a ViewModelStoreOwnder
s
got it... thanks @Sergey Dmitriev
🙌 1