m.request pagination limits and query bounding behavior in Mithril.js
0 reputation · 30 Nov 2024, 07:36 UTC
Mithril.js provides m.request for declarative XHR and Fetch based data loading with custom headers, body and options supplied by application code. Routing via m.route supports parameterized paths and route resolvers that can load data before view rendering.
The design goal is to render a large dataset with bounded queries and pagination while relying on core Mithril primitives. Core does not include query bounding, cursor pagination, or large dataset virtualization helpers, and rendering large lists relies on virtual DOM diff with stable keys.
Uncertainty remains about where pagination state and query limits should be modeled given the separation between m.request, route resolvers, and component lifecycle hooks oninit, oncreate, onupdate, onremove. Redraw scheduling also depends on mounting with m.mount versus m.render.
Does m.request expose a documented way to enforce server-side limits without application-level wrappers? Is pagination state expected to live in route parameters, component state, or a stream primitive? What redraw behavior is defined when a paginated list updates with new keys?