is there any reason that a mutable state flow woul...
# compose
g
is there any reason that a mutable state flow wouldnt cause a composable function to reload its state when the value of the state flow has changed? I'm running into an issue where I'm changing the value of a mutable state flow but the composable function that collects it as state is not receiving the update or doing a rerender
a
This is usually because you are using the same instance of a mutable object (such as
MutableList
,
Calendar
, etc).
StateFlow
doesn't emit the value if you update it with the same instance.
a
Share the code
d
+1
j
https://handstandsam.com/2021/01/15/my-mutablestateflow-didnt-emit/ - as @Albert Chang that usually happens with mutable data structures