-
Replace all operations in the domain's logic with Kotlin's
Flow
asynchronous data-stream API so they'll automatically react to data changes by emitting new values. -
Leverage reactive data sources:
- Room DB Flow DAOs
- DataStore Flow
- Encapsulate use-cases in FlowAction.
Ivy Wallet UI should update every time [transaction, account, category, exchange rate, base currency, ...] change. Doing this imperatively inceases complexity and make ViewModels gigantous!
Go reactive by migrating to Kotlin Flows. See Flow Actions.
- The app will react automatically to data changes.
- Flows can introduce out-of-the-box caching and efficient async processing.
- Reducing complexity by not thinking which states we need to update imperatively (manually).