DEV Community

Discussion on: A case against the MVI architecture pattern

Collapse
 
mochadwi profile image
Mochamad Iqbal Dwi Cahyo

for now the MVFlow is the simplest we can think of at the moment, also I'm fully agreed with you

Both lines are surrounded with completely unrelated code

any suggestion at the moment to optimize this instead?

spend more time jumping around trying to find code than actually reading code.

Thread Thread
 
feresr profile image
Raviola

any suggestion at the moment to optimize this instead?

Personally, I'd just switch to another Archtecture pattern (MVVM) or use an MVI library that does not impose strict rules regarding where you have to do the mapping, and where you have to perform state reduction.

This library for example avoids the (intent -> action) mappings altogether. When you call add you can follow the flow linearly and the state is reduced contextually.

orbitlibrary

Thread Thread
 
mochadwi profile image
Mochamad Iqbal Dwi Cahyo • Edited

thanks for the suggestion, the Orbit-MVI 3 seems fit our usecases and a simplified version! ❤️