# uniflow

Davide C

05/13/2021, 7:00 PM
Hi! Can you please give me a hint on which is the best practice in a scenario with two or more parallel sources updating the UIState? In this example the state is updated by a "polling service" every second and by an "on-click service" which takes 3 seconds to complete, while the on-click action is running the polling actions are queued and the state is not updated. I tried to move the on-click call out of the action, it works but i'm not sure it's the right way...


05/14/2021, 5:18 AM
It should either be one action that runs the parallel processes that update the state, or the state updates should happen in different sequential actions.
Normally, actions are actions originating from the UI by the user

Davide C

05/14/2021, 7:24 AM
Is it wrong to consider the system like a special user? I mean, it's quite common in a mobile screen that data is updated without direct user interaction, i.e. location updates. How this behavior should be implemented in a MVI pattern?