Introduction

There are many ways to name this architecture, Unidirectional data flow, MVI, Redux but all these names are making reference to the same or similar concept: Create a single source of truth and a unidirectional information flow.
By the way, MVI (Model View Intent) might confuse some people because Intent is already used in Android with another meaning. In my opinion “Unidirectional architecture” is better naming.

Image for post
Image for post
An example of how it could be (image from https://proandroiddev.com/android-unidirectional-state-flow-without-rx-596f2f7637bb)

Purpose of this article

The main purpose of this article is to make a simple implementation of this architecture with the recent StateFlow from Kotlin, test edge cases and try to solve possible problems. …

David Santos

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store