fn Counters() -> Element { let mut counters = use_signal(|| vec![0; 10]); rsx! { button { onclick: move |_| counters.push(counters.len()), "Add Counter" } ul { for idx in 0..counters.len() { li { button { onclick: move |_| counters.write()[idx] += 1, "{counters.index(idx)}" } button { onclick: move |_| { counters.remove(idx); }, "Remove" } } } } } }