Closed SuhasDissa closed 7 months ago
data
: Databases or any other data sourcesdomain
: The link between data source and UI, Store repositories and data classes herepresentation
: The user presentable parts of the app
presentation
directory to store all the user presented components.
screens
: screens with their own navigation destinationwidgets
: home screen widgetscomponents
: simple composables that are being used by multiple screensfeatures
: more complex composables that can't be considered as screens ( dialogs, bottom sheets)
Create directories for each screen and store all the related components and viewmodels under that
This will make it easier to locate components used by each screen
@Composable
fun ClockScreen(){
Column{
CurrentTimeDisplay()
WorldClockList()
}
}
This will help prevent any unexpected behavior when navigating
Avoid passing viewModels into smaller components and use function parameters and callbacks.
Makes it easy to test and preview the components. Makes the components re-usable
This is what I personally suggest. If you have any other ideas please let me know. I completed only the first two steps in this PR