Is there any project that demonstrates how to use ...
# compose-desktop
y
Is there any project that demonstrates how to use compose with a database? I was going through the tutorials for jetpack compose (since compose desktop is based on that) and they use a LazyColumn when there are many items to make sure that only the visible ones are rendered. But what if the items were coming from a database? Not rendering them is certainly a win, but if you have to load them all that is a problem. How do you handle this kind of use case? I guess in other words, I am looking for an actual application, not a toy demo/tutorial...
a
You should still have a list of items in the state and LasyColumn. And load items page by page when scrolling reaches end.
y
I am not sure how you would do such a thing
a
Catch the "scroll end" event, load more items from the database, add the new items to the end of the list in the state. You should copy the original list and assign the new one to the state.
y
thanks
r