Nathan Bedell
06/27/2023, 4:19 PM(State, Action) -> State
, but my question was more about how to actually action this reducer to do stuff with the UI.
Currently we are taking in a Flow of Actions, an initial state, and updating that state (as a StateFlow) by launching a collect block on the action flow to update the state. The body of the collect statement on the flow is synchronized with a mutex so actions should (I was hoping anyway) get executed in order sequentially.
In practice, this seems to work. However, I've noticed in tests this sometimes fails, which makes me wonder if my setup of this is actually optimal. I was thinking maybe a channel of user actions might be more robust, but open to ideas!