Jan 12, 2021
There shouldn't be any issues in having just one state, because both JetpackCompose and SwiftUI are very well optimized for detecting changes.
You can nest the state information of each screen inside the overall state. For example, you can have data classes for each screen, which are just properties of the overall state.
The AppState is simply retained by the StateFlow. You don’t need to use onSavedInstanceState. Everything really works out very clean. Your single source of truth is the AppState hold by the StateFlow.