
Render a list by recreating all items
Each.RdIterates over a reactive list and calls fn for each item. When the list
changes, all items are destroyed and recreated. For a version that updates
items in place, see Index().
Arguments
- items
A reactive expression that returns a list.
- fn
A function of
(item)or(item, index)whereitemis the plain item value andindexis ashiny::reactiveVal()that tracks the item's current position (updated on reorder). Should return a tag tree.- by
A function that extracts a comparable key from each item, used for keyed reordering. Keys must be unique. Defaults to
identity().