Hi everyone,
I have been playing around with Orbit-MVI lately and I really like its simplicity.
However, after using Mobius for a long time I'm not too sure what the best practices are. So here's my problem.
I usually represent my network calls as suspend function returning and Either from the Arrow library.
In Mobius, when consuming an Either I would just call
fold()
and dispatch and effect on the left case (error), and a new state on the right case (success), within the same
fold()
Using Orbit-MVI I either have to fold the
apiResponse
twice in the reduce block and the suspend block from the
intent
(option1), or do the
fold()
outside the reduce block but then the fold is happening in the impure world which isn't good practice in my opinion.
Which option do you think is best, and is there any alternative to achieve this?