In an app with a screen and a viewmodel that uses ...
# compose
p
In an app with a screen and a viewmodel that uses ROOM to store and retrieve data, which approach is better? to use viewmodelscope inside the viewmodel functions that access the database? or to make these functions suspend and use rememberCoroutineScope to call them in the screen?
s
You probably want to scope this work to your ViewModel which will survive more scenarios that your compose CoroutineScope would.
💯 1