I think I'm at the stage where I would pay for support to help me understand compose/livedata/room/state/flow stuff! Does such a service exist anywhere? A one-to-one discussion?
š° 1
v79
12/20/2022, 9:25 AM
I'm finding it very hard to even articulate the difficulties in having in my understanding. Perhaps I'm too old. I'm a very procedural-minded developer.
s
Stylianos Gakis
12/20/2022, 2:00 PM
Yeah also important to note that these things can be quite different from each other.
Understanding Flows and coroutines is one thing, and understanding compose state is another. Then putting them together is yet another.
Iād suggest you try and understand Flows first, and then the rest will fall into place. Especially since you say that you also have issues understanding Room, which I assume again itās the flows part of it.
You can completely skip LiveData I think at this point, at least weāve done that on our project.
And as far as sources go, not sure, the official android docs are great in general imo, but one thing that stood out for me was this series https://code.cash.app/rx-to-coroutines-concepts. I donāt even know RX, but still this let me understand a bunch of things about coroutines.
v
v79
12/20/2022, 3:35 PM
Thank you. I'll take a look. LiveData is still in a lot of the official documentation. And I often want to fetch a value from the database - an ID - not a continuously updating or dynamic list of objects. My use case is: fetch an ID stored in a table, then fetch the entity with that ID from a different table. So I don't need a flow of IDs... do I?
s
Stylianos Gakis
12/20/2022, 4:09 PM
If you want a one shot operation, room gives you the ability to simply mark the function as suspend and you get the one shot value perfectly fine.
v
v79
12/20/2022, 5:49 PM
Thank you Stylianos. I think the documentation pushes you to LiveData. I've taken that out and replaced it with suspend functions where needed. And it's behaving much better, and simpler code. Still got lots to learn - I don't think it's fully "sunk in" to my brain yet.
v79
12/20/2022, 5:58 PM
I'd still pay for a code review... š°!
s
Stylianos Gakis
12/21/2022, 9:04 AM
Hmm interesting that youāve had this feeling from reading the docs, I feel like I havenāt seen a LiveData declaration in months š Might be me just filtering it out from my brain though š
And yeah, it doesnāt āsink inā that fast, but it will eventually, it definitely took me a while, and thereās still so much to learn, as always.
Itās gonna be hard to find someone even to pay them to help you. I find it that before you know enough on a topic, itās hard to be taught by a random person since you may not know enough to at least recognize if theyāre saying wrong things or not, so thatās always scary. Gl finding someone though š