Aveepsit Chowdhury
10/26/2019, 12:09 PMrkeazor
10/26/2019, 1:09 PMrkeazor
10/26/2019, 1:09 PMPablichjenkov
10/26/2019, 2:51 PMevents
and messages from View to ViewModels actions
.
You can call any ViewModel action dispatcher method directly from the ViewModel reference you have in your View. Assuming you dispatch them from the Main Thread you wouldn't need a queue inside the ViewModel.
If you plan to dispatch actions to the ViewModel from more than one thread, then you should have an action queue inside your ViewModel that process them one by one. This will avoid multi threading issues. For that you can research for Redux Store in Redux arch.
But for simply handling View actions like clicks, direct dispatch is fine.