Closed Mats-Hjalmar closed 2 weeks ago
Instead of a StateFlow use a SharedFlow with repeat 1. You will also have to update the Update Policy in your compose State, because compose State also don't Emit events on the same event. Bottom line you should change your design into something that represents your state not depending on this state updates. That would be better for performance too.
Thanks @pablichjenkov for reply regarding the specific issue.
I'll just add regarding porting LiveData
to multiplatform - there is no plan to do that.
Obvious reasons are:
LiveData
is written on javaFlow
equivalent with all lifecycle bindings
I have an App where we are using
MutableStateFlow
to share data to the UI. Problem is that we need to update the view when the same value is emitted on the flow.