Skip to contents

Iterates 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().

Usage

Each(items, fn, by = identity)

Arguments

items

A reactive expression that returns a list.

fn

A function of (item) or (item, index) where item is the plain item value and index is a shiny::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().

Value

A nacre control-flow node.