Replies: 1 comment
-
I was thinking the same. Actually (pun intended 😉) this should be pretty simple: expect open class ViewModel() {
val viewModelScope: CoroutineScope
protected fun onCleared()
} and in import androidx.lifecycle.ViewModel as AndroidViewModel
import androidx.lifecycle.viewModelScope as androidViewModelScope
actual open class ViewModel : AndroidViewModel() {
actual val viewModelScope: CoroutineScope
get() = androidViewModelScope
actual override fun onCleared() {
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was checking your library to see if we can use it in our new project (great work by the way). What is the reason that you don't use viewModelScope of architecture ViewModel for Android? Also, I saw that #110 you will move LiveData implementation to common. Won't this make you move away from architecture LiveData?
Beta Was this translation helpful? Give feedback.
All reactions