tieskedh
12/05/2020, 2:42 PMTask
which the binder then connects to the real use-cases is the best way?
The output of the use-cases should then be dispatched to the reducer.
Probably using the binder too?
Intents that only need simple updates (which don't need suspending) can be dispatched by the Executor itself.
The other alternative would be to give the Use-case classes all to the executor (which is a SuspendingExecutor after all), but I think this approach is way cleaner.
The Task-class could be implemented using Label with a lambda to dispatch.
Is this the way to go, or is there a better one?Arkadii Ivanov
12/05/2020, 3:26 PMArkadii Ivanov
12/05/2020, 3:28 PMtieskedh
12/05/2020, 3:43 PMArkadii Ivanov
12/05/2020, 3:48 PMtieskedh
12/05/2020, 4:01 PMTask
(Label) with the correct data.
The results of course need to go back to the Reducer.
I can move those UseCases to the Bootstrepper.
There I can observe them and send results as action to the Executor, which links them to the Reducer.
The executor can send data to them using Labels.
In that way, everything is picked up by the middleware?Arkadii Ivanov
12/05/2020, 4:20 PMtieskedh
12/05/2020, 5:11 PMArkadii Ivanov
12/05/2020, 5:14 PM