1
0

iterators.rs 330 B

123456789101112131415161718
  1. use dioxus::prelude::*;
  2. fn main() {}
  3. static Example: FC<()> = |cx| {
  4. let (g, set_g) = use_state_classic(&cx, || 0);
  5. let v = (0..10).map(|f| {
  6. rsx! {
  7. li {
  8. onclick: move |_| set_g(10)
  9. }
  10. }
  11. });
  12. cx.render(rsx! {
  13. div {
  14. {v}
  15. }
  16. })
  17. };