Update <For/> in example

This commit is contained in:
Greg Johnston 2022-12-11 20:21:07 -05:00
parent 109863c59a
commit 86d5f4c2e4

View file

@ -63,14 +63,16 @@ pub fn Counters(cx: Scope) -> impl IntoView {
" counters."
</p>
<ul>
<For each=counters key=|counter| counter.0>{
move |(id, (value, set_value)): (usize, (ReadSignal<i32>, WriteSignal<i32>))| {
<For
each=counters
key=|counter| counter.0
view=move |(id, (value, set_value)): (usize, (ReadSignal<i32>, WriteSignal<i32>))| {
view! {
cx,
<Counter id value set_value/>
}
}
}</For>
/>
</ul>
</>
}