Open
Description
In the dom-hacking example, we ensure we can add children in a loop (which also works for a conditional):
moxie/dom/examples/hacking/src/lib.rs
Lines 26 to 39 in dfca4be
It would be nice to be able to write the whole example as a single mox invocation, maybe something like:
mox! {
<div>
<div>{% "hello world from moxie! ({})", &count }</div>
<button type="button" |_| set_count.update(|c| Some(c + 1))}>
"increment"
</button>
|mut root: Div| -> Div {
for t in &["first", "second", "third"] {
root = root.child(mox! { <div>{% "{}", t }</div> });
}
root
}
</div>
}