#Molecule #Paging-compose
Hello people, I promised myself to explore Molecule, but never had a chance.
I’m integrating Paging in my Compose project, and what I hate most is the fact that your
paged items cannot be part of the State, as you need to
collect the paged Flow from Compose
I was wondering if Molecule can solve this, as I imagine I could do the following:
class MyViewModel {
val state = launchModulecule {
val lazyPagingItems = pagedFlow.collectAsLazyPagingItems()
MyState(
items = lazyPagingItems,
stuff = someStuff
)
}
}
Is this correct?