What problem does it solve?
Efficiently implementing pagination for large lists and feeds across apps can be error-prone and labor-intensive. This Skill provides a production-ready pagination infrastructure that supports both offset-based and cursor-based loading patterns, enabling smooth infinite scrolling and robust data loading.
Core Features & Use Cases
- Offset and cursor pagination: Supports traditional page-based APIs and cursor-driven streams for real-time data workloads.
- Stateful pagination management: Includes a comprehensive state machine (idle, loading, loaded, loadingMore, exhausted, error) with prefetching to optimize UX.
- SwiftUI integration: Provides ready-to-use patterns and adapters for building scrollable lists with automatic pagination, error handling, and empty states.
- Search-ready flow: Optional adapters to combine pagination with debounced search queries for dynamic datasets.
Quick Start
Instantiate a pagination data source, attach it to a PaginationManager, and call loadFirstPage() to fetch the initial data.