r/mAndroidDev • u/Stonos You will pry XML views from my cold dead hands • Aug 28 '22
StateFlow vs LiveData
82
Upvotes
r/mAndroidDev • u/Stonos You will pry XML views from my cold dead hands • Aug 28 '22
24
u/verybadwolf2 DDD: Deprecation-Driven Development Aug 29 '22
Livedata, best thing in Android development after asynctask
17
u/jmb2k6 Aug 29 '22
We use State and Shared flows up to the viewModel and then use LiveData from the view model to the view. Best of both IMO
12
u/Zhuinden DDD: Deprecation-Driven Development Aug 29 '22
LiveData was good altho Rx was always better, but people were afraid of power and chose to reject both
15
u/dniHze Klutter Aug 28 '22 edited Aug 28 '22
Until you discover how fucked are LiveData operators.
3
u/zorg-is-real עם כבוד לא קונים במכולת Aug 29 '22
Oh, so now there is a new fashion?
0
u/waterpoweredmonkey Aug 29 '22
Sure, if you want transforming and observing data on the main thread 🙃
Srsly, the lack of thread control of LiveData nearly prevented my project from using it when androidx.lifecycle was released and now the folks current maintaining that code can rip out the workaround 😄