Join Slack
Powered by
Why do we need to pass a `Scope` to `stateIn` oper...
# coroutines
s
Saiedmomen
10/21/2021, 9:53 PM
Why do we need to pass a
Scope
to
stateIn
operator when the
MutableStateFlow
constructor doesn't need a scope?
l
louiscad
10/21/2021, 10:02 PM
Because the flow being shared must be collected in a coroutine, requiring a scope.
👍 2
s
Saiedmomen
10/21/2021, 10:08 PM
yeah that makes sense. Thanks ❤️
13
Views
Open in Slack
Previous
Next