Skip to content

For and Index

Lists that update row by row.

For

For renders one row per item. With keyBy or key, rows are reused and moved when the array changes. The item is a plain value and index is an accessor.

A field that changes on an item with the same key does not render again. Keep such fields in a signal on the item, like done above, or use a store.

Index

Index is the other way round: the item is an accessor and the index a number. Rows stay in place and only their item changes. Use it for lists of primitives edited in place, and read item() inside a binding.