carlosjordi
11/08/2021, 10:03 PMCasey Brooks
11/08/2021, 10:12 PMViewModel
class and related libraries are all just implementation details to get around the error-prone lifecycle of Android apps.
It's pretty easy to just create your own ViewModel class based around pure-Kotlin concepts like Flow, and have it live as a member of your Application or Window as appropriate. You can even just create and remember
it directly within the composition where it is relevant, and let the composition itself dictate the ViewModel lifecycle, such as by handling any "inputs" to the ViewModel within rememberCoroutineScope()