Kotlin - Android Jetpack Compose LazyVericalGrid
Channel: Kaloyan Karaivanov
Date: 2022-05-27

Kotlin - Android Jetpack Compose LazyVericalGrid and Clean Architecture Model View ViewModel (MVVM)

1. Presentation Layer
2. ViewModel (Business logic)
3. Data Layer ( simulation of remote repository with external changes and state with flows)
4. Best practices for coroutines in Android:
- Suspend functions should be safe to call from the main thread
- The ViewModel should create coroutines
- Don't expose mutable types
- The data and business layer should expose suspend functions and Flows
- Creating coroutines in the business and data layer

Useful links:
https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/grid/package-summary

GitHub: (coming soon)