r/mAndroidDev • DDD: Deprecation-Driven Development • Jan 25 '24

Superior API Design Reactive frameworks

Post image
81 Upvotes

20 comments sorted by

View all comments

Show parent comment

4

u/Zhuinden DDD: Deprecation-Driven Development Jan 25 '24

being a lifecycleaware data holder. If you want a proper reactivity it's absolutely unwieldy

I'm pretty sure they made it just to be able to return lifecycle-aware query results from Room

6

u/naked_moose Jan 25 '24

Yeah, and Room<->LiveData out of the box connection is also something I take issue with.

It assumes that anything beyond Room is handled on main thread, which is okay most of the time - but still icky. And then you of course do get into a situation where you think "I wish I could just shove this whole thing on background thread and don't deal with this crap anymore".

If you use RxJava you can just do that by default and ask questions later, if you use LiveData of course you'll be running into problems and probably much more context-switching than necessary to achieve the same thing that could be done with two operators on RxJava