Has anybody ever implemented paging with MVIKotlin...
# mvikotlin
a
Has anybody ever implemented paging with MVIKotlin or know of a sample?
a
Usually it's pretty simple. You have
Intent.LoadMore
which is issued in the UI when the last item (or loader) is shown. In the Store, you have the size of the list and you execute a request (or query) with
offset=items.size
. You can also have
canLoadMore
flag in the state, which is updated every time a new batch is loaded. And you can also store page tokens in the state if that's needed. No need for additional paging libraries.
🙏 1