Hi! Is it possible to use Livedata from the `lifec...
# multiplatform
e
Hi! Is it possible to use Livedata from the
lifecycle
library in KMM? I was able to start using the viewmodels but I am not able to use the
Livedata
h
seems yes https://github.com/kernel0x/kmpapp if not flows works 100% in KMP
e
I see they are using moko-mvvm for the livedata
h
Don't want to use flows?
e
If I don't have more options... But I like LiveData because it is lifecycle aware and I would not like to do a big refactoring
h
yes it's true
but with state flows you can achieve similar work lifecycle aware
Copy code
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5000), emptyList())
im using this
e
Thank you! I will stay with moko-mvvm though, I am sure that they will include it soon or later in jetpack and then it will be easy for me to change it