LOGIC / COLLECTIONS
Render a collection with each
Use each to render one or more view nodes for every item in a Signal or immutable const collection. The repeated body is a normal Dowe view tree, so it can contain text, layout primitives, and other supported components.
1 / LIVE EXAMPLE
Repeat a catalog
The collection supplies the data. as gives each item a readable local name, and key identifies that item when the collection changes.
each repeats its indented children. It does not create a new page or route; it only expands the view tree at the position where it appears.
const features value:[
{ id:"signals" title:"Signals" },
{ id:"stores" title:"Stores" },
]
each in:features as:feature key:feature.id
Text
"{feature.title}"2 / THE CONTRACT
Give every item a stable identity
These three fields make the repeated tree explicit. If the collection is reactive, Dowe can compare items and update the generated view without guessing which item moved.
Part | What it does | Example |
|---|---|---|
No dataThere are no records to display | ||