Pagination limits in Elm Architecture for large datasets
0 reputation · 07 Jun 2023, 17:47 UTC
Designing a front-end that displays a large dataset in Elm raises questions about where pagination boundaries are enforced and how state is tracked across updates.
Documented capability
The Elm Architecture documents a Model-View-Update pattern with Cmd for side effects and elm/http for data fetching. The Model typically holds current page data, and the View renders navigation controls that dispatch messages such as PageChanged. Pagination state management and data fetching are described as manual implementations.
There is no documented built-in virtual scrolling or automatic query bounding in the core libraries. The decision of whether to bound queries at the source API versus client-side slicing, and how to represent loading and error states for successive pages in the Model, remains open.
What is the documented expectation for where page index and total count live in the Model? How should Cmd be composed to represent in-flight page requests without duplicating fetches? Is client-side slicing of a bounded response considered supported behavior within Elm Architecture guidelines?