Daniele B01/12/2021, 9:19 PM
jim01/12/2021, 9:22 PM
Daniele B01/12/2021, 9:29 PM
Each of these are also data classes, which hold the relevant state fields for that screen. So, it’s still modular. My concern is about performance.
data class AppState ( val homeScreen = HomeScreen(), val loginScreen = LoginScreen(), val settingsScreen = SettingsScreen(), val profileScreen = ProfileScreen(), val resultsScreen = ResultsScreen(), )
Colton Idle01/12/2021, 9:31 PM
Casey Brooks01/12/2021, 9:32 PM
level, so if you pass
as parameters to the each screen instead of
, I think it shouldn’t impact performance too much. In general, passing the minimal amount of state necessary to each function is best for modularity and reusability as well
Daniele B01/12/2021, 9:39 PM
jim01/13/2021, 9:32 AM
data should be split off and passed to the home widget, rather than passing the whole AppState object.