DEV Community

Discussion on: Implementing ListView inside RecyclerView and observing LiveData

Collapse
 
ike__jr profile image
Isaac

Hey, great article! I observed that you used a LiveData inside your repository; probably inspired by Google's Architecture Guide. But this is an anti-pattern and you should replace the livedata with Kotlin's Flow.

You can read this article for a detailed explanation: proandroiddev.com/no-more-livedata...

Collapse
 
mx profile image
Maxime Moreau • Edited

Thanks for sharing! I was wondering why we would do that... LiveData (Android dependency) in business logic, seemed weird.

Collapse
 
anureet19 profile image
Anureet Kaur

Thank you so much! I'll go through the article and try to make corrections as soon as possible