Editorial question36.5K views3,363 votes0 answers1,041 following
AI-generatedKey Strategy Trade‑off for LazyColumn with Paging 3 Placeholders
A LazyColumn backed by Paging 3 must supply a key lambda that preserves item identity across recompositions and configuration changes, especially when placeholders are enabled by default. Using the domain ID (key = it.id) works only if the ID is immutable; Paging 3 inserts null placeholders, forcing a null‑safe fallback such as it?.id ?: -position, and Remot