06/28/2022, 3:31 PM
Should I use remembercoroutinescope or viewmodelScope? Which one is right for my scenario? In my example, I need to perform a process and if it is successful, the app should navigate to the next page. The first approach uses viewmodel scope on a non suspend function and then uses a callback to let the UI know that the process is complete. The second approach is declaring a coroutine scope in the UI level and then making the viewmodel a suspend function. Which would be the right approach for my scenario? What's the advantage of each approach over the other? Is there a particular...