infinite-scroll-fullstack
Installation
SKILL.md
Infinite Scroll — Fullstack
Discovery
Infer from context, then confirm:
- Data fetching library? — React Query (
useInfiniteQuery), SWR, RTK Query, or raw fetch? - Current pagination type? — Offset (
page=2&limit=20) or already cursor-based? - Navigation pattern? — SPA (no page reload) or MPA/SSR (scroll position lost on back-nav)?
- Data mutates while user scrolls? — Feed where new items are inserted at the top (cursor matters more), or stable dataset?
Cursor vs. Offset: Pick Cursor
Offset pagination is tempting because it's simple, but breaks under any of these conditions: