MVI Beyond State Reducers: A Modern Kotlin-Based MVI Architecture
Article Summary
Zsolt Kocsi from Bumble reveals how their chat module had bugs so elusive that QA could record them happening but developers could never reproduce them. The culprit? Uncontrolled state management in a massively asynchronous system.
Bumble's Android team faced a critical problem: their rewritten chat module was causing fewer first messages to be sent, hurting business metrics. Even with Clean Architecture, race conditions and unpredictable state changes created bugs that were nearly impossible to debug. This led them to develop MVICore, an open-source MVI framework that goes beyond simple state reducers.
Key Takeaways
- Single immutable State object eliminates race conditions and unpredictable bugs
- Reducer creates new states through deterministic transactions, making behavior traceable
- Features encapsulate all business logic with optional Actor, NewsPublisher, and Bootstrapper components
- Built-in middleware for logging and time-travel debugging on every component
- Solves the SingleLiveEvent problem with News type for one-time events
MVICore provides a complete MVI architecture that scales from simple reducers to complex async workflows while keeping all business logic deterministic and debuggable.