dioxus/examples/doggo.rs

17 lines
304 B
Rust
Raw Normal View History

2021-07-05 05:11:49 +00:00
use dioxus::prelude::*;
fn main() {}
static Example: FC<()> = |cx| {
2021-07-06 16:13:00 +00:00
let (g, set_g) = use_state_classic(&cx, || 0);
2021-07-05 05:11:49 +00:00
let v = (0..10).map(move |f| {
rsx!(li {
onclick: move |_| set_g(10)
})
});
cx.render(rsx! {
div {
{v}
}
})
};