ForEach

fun <T> IsometricScope.ForEach(items: List<T>, key: (T) -> Any? = null, content: @Composable IsometricScope.(T) -> Unit)

Renders content once for each item in items.

Providing a stable key function is strongly recommended for lists that change over time. Without keys, Compose treats the list positionally — removing an item from the middle causes all subsequent items to recompose. With keys, only the removed item's node is deleted and the rest are reused.

Parameters

items

The list of data items to iterate over.

key

Optional function that returns a stable, unique key for each item. When provided, enables efficient add/remove/reorder without full re-render.

content

Composable content block invoked for each item, receiving the item as a parameter within IsometricScope.