Hey, how do you observe SharedFlow in Jetpack Comp...
# coroutines
l
Hey, how do you observe SharedFlow in Jetpack Compose? I am currently observing StateFlow in Compose like so: val state by myViewModel.myStateFlow.observeAsState() but was wondering what the right thing to do is with SharedFlow
f
same idea, but you have to provide a default value,
Copy code
flow.collectAsState(initial = initialValue)
l
Great. Thanks