ahmedeltaher/MVVM-Kotlin-Android-Architecture

[Question] Is it best practice to have live data in data Layer

MahmoudMabrok opened this issue · 1 comments

[Question] Is it best practice to have live data in data Layer

No, it is not a best practice, livedata is life cycle awareness observable, you don't need that in data layer, I recommend to use flow which is cold observable in the data layer.
In this sample we use Kotlin flow.