Unidirectional data flow on Android using Kotlin
summary
A runnable Kotlin sample app (two screens, item list with add/edit/delete) demonstrates a unidirectional store that uses Kotlin sealed classes for exhaustive reducers, keeps immutable state and actions, and runs with a pure Kotlin store, no Android dependencies, so domain logic is unit-testable. Side effects are optional; a persistence side effect toggles on/off in the demo and when enabled repopulates state after restart, showing the approach works end-to-end.
AI-written summary · about
chapters (16)
- 0:00Intro
- 2:35Components
- 5:17Why Kotlin
- 6:58Sample app
- 13:28Dependencies
- 16:02ControllerView
- 18:00Supersimple
- 19:37Action Intention
- 20:55Classes
- 22:26Store
- 24:09Store Side Effects
- 28:42Encoding
- 30:14Side effects
- 31:03Testing
- 31:56Demo
- 36:15Thoughts
related talks
31mUnidirectional Data Flow with...
45mExploring the possibilities of Unidirectional Data Flow Architectures on Android (en)
38mRedux for Android
31mFlux: Utilize unidirectional data flow ...
49mKotlin Reactive Programming Patterns
41mKotlin for the JVM and beyond
40mCompose Without Flow: Unidirectional State with Snapshots and Coroutines
49mRiding the state flow
