Browse Mobile App Development Section 6: UI Implementation

Handle Complex Lists & Scroll Performance

5 fill-in slots · from The AI Prompt Handbook for Mobile App Development

Your details

0/5 filled

Handle Complex Lists & Scroll Performance

Background: Native [platform] app, [SwiftUI / Compose]. I have a list/
feed that's [long / paginated / has mixed cell types / has images]. It's
[janky / not built yet]. Data comes from [source].

Use case: Build (or fix) this list so it scrolls at 60/120fps and loads
more as the user reaches the end.

Implementation details:
- iOS: LazyVStack/List, stable identifiers, avoid expensive work in row
  bodies, async image loading with placeholders. Android: LazyColumn with
  stable keys and contentType, remember/derivedStateOf to avoid needless
  recomposition.
- Pagination: load-more trigger, loading/footer state, end-of-list and
  error-while-paging handling
- Diffing/identity so updates animate instead of reloading everything
- Image handling: downsampling, caching, cancelling off-screen loads
- Avoid layout thrash and over-recomposition/redraws

Layer & dependencies: Paging state lives in the view model/state holder;
the list view just renders pages.

Deliverable: The performant list implementation, the pagination state and
trigger, the identity/diffing setup, the image-loading approach, and the
top recomposition/redraw pitfalls to avoid for this list.

Highlighted [slots] are still empty. Downloads are plain .txt — paste into any AI assistant.