Hello there! At the Google I/O 2019, in Declarativ...
# compose
g
Hello there! At the Google I/O 2019, in Declarative UI Patterns talk,
asyncLoad
function is presented by speakers in one slide (

https://youtu.be/VsStyq4Lzxo?t=1267

) but I don’t find this function in the latest artifact or in source code of Jetpack Compose. Someone can tell me if this function has been removed or if it is in development? Thanks in advance! 🙂
a
it's not there yet, we still have some glitches around suspend function generation in the version of the IR compiler we're using
You can get a non-suspending version of it using `onCommit`/`onDispose` today
along with
+state
a
@Adam Powell is there a timeline around suspending support in the IR compiler?
flow
+ Compose is just so freaking exciting.
a
I agree; I think @Leland Richardson [G] is getting tired of me talking about it in the office 😛 We just were talking about it yesterday afternoon. He mentioned some upstream changes that were in progress in December but wasn't sure if they're merged yet, and we need to rebase the compose compiler plugin on top of a more recent kotlinc to get any changes
I think the conversation went something like, "...because you can't imagine writing non-suspending code anymore." "I can, I just don't want to." 😄
k
so many people are waiting for the new IR backend 🙂 I guess the april promised release is not close enough 😄. @alexsullivan114 about flow + Compose, did I miss something exciting? Do you just want to call suspend functions in Compose or there are some other idea behind the excitement? I was able to use ViewModel in compose separating an architecture model from the UI layer. I assume you are looking for something else tho 🙂
a
No using
ViewModel
+
LiveData
gets you a similar thing - I just don't want to use
LiveData
....or the
ViewModel
part 😛 I could also accomplish something similar with RxJava. But flow is so much cooler than rxjava or livedata and I just want to experiment with these two awesome concepts.
a
it works if you separate your suspending code and your compose code into different modules and you can get a bit of a feel for it, but it's definitely not the same as what we're going for yet