https://kotlinlang.org logo
#coroutines
Title
# coroutines
l

Lilly

11/30/2023, 5:56 PM
Is there any way to get
MutableStateFlow
to work with
WhileSubscribed
? I think the idea of
WhileSubscribed
is nice but it looks like the usage is limited if we are going directly from a cold flow to a hot flow
l

louiscad

11/30/2023, 6:55 PM
You can look into subscriberCount, or use Flow.shareIn otherwise.