Troy Perales
11/09/2022, 5:12 PMA MonotonicFrameClock is not available in this CoroutineContext... crash when I use viewModelScope to launch Molecule as it is bound to Dispatchers.Main.immediate. My solve was to simply launch with AndroidUiDispatcher.Main, since having the ViewModel hold the Presenter is enough to make it survive configuration changes. Am I missing something else here?
2. What is the recommendation for emitting events within a Composable screen (or any view, for that matter)? The snippet has events as a SharedFlow, but it does not successfully emit an event when I call events.tryEmit(LoginEvent) and calling emit directly won’t work outside a coroutine.andrew
11/09/2022, 5:17 PMTroy Perales
11/09/2022, 5:18 PMandrew
11/09/2022, 5:18 PMandrew
11/09/2022, 6:44 PMAndroidUiDispatcher.Mainandrew
11/09/2022, 6:45 PMandrew
11/09/2022, 6:46 PMandrew
11/09/2022, 6:47 PMandrew
11/09/2022, 6:48 PMandrew
11/09/2022, 6:50 PMEventsEffect is just a shorthand I made to avoid lambda soup🙂Daniel Perez
01/04/2023, 5:00 PMEventsEffect example, how do you launch new coroutines since the CoroutineScope provided by LaunchedEffect is no longer available?