Skip to main content

Posts

Featured

MVI / MVVM - Examples

This is the accompanying examples post to  MVI - Overview with Linked Examples . These should be read together starting with that post first. IMPORTANT Note: These examples contain some known errors. I intend on fixing these tomorrow. Our Examples We will look at two examples of  MVI  to help explain the concepts. For the purpose of these examples, I will avoid explaining all the layout details. Instead, I will just focus on the organization and how we connect the UI and data. You can always check the full code GitHub Gists to see exactly how everything fits together. Example 1: MVI - Basic Color Selector We have a very simple color selector. This example is too basic to understand the benefits of  MVI , but it does clearly demonstrate how it works. We have our data class and and action interface: Basic Color Selector - Data UiState  tracks the state of the UI for our Composable to display the data. data class UiState( val color : Color = noColor , ) UiActio...

Latest Posts

MVI - Overview with Linked Examples

MVI - Desired State Pattern

DataStore / SharedPreferences 2026 - Bonus!