Keys for Stable, Fast Lists
Help Compose track items across changes.
How Compose Tracks Rows
By default, Compose identifies each row by its position in the list. Item zero is item zero, item one is item one, and so on.
Position Breaks on Change
When you insert or remove a row, every item below shifts position. Compose now thinks those rows are different and rebuilds them needlessly.
All lessons in this course
- LazyColumn vs Scrollable Column
- items & itemsIndexed
- Keys for Stable, Fast Lists
- Sticky Headers & Section Lists