mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-26 22:20:19 +00:00
16 lines
305 B
Rust
16 lines
305 B
Rust
use dioxus::prelude::*;
|
|
fn main() {}
|
|
|
|
static Example: FC<()> = |cx| {
|
|
let (g, set_g) = use_state(cx, || 0).classic();
|
|
let v = (0..10).map(move |f| {
|
|
rsx!(li {
|
|
onclick: move |_| set_g(10)
|
|
})
|
|
});
|
|
cx.render(rsx! {
|
|
div {
|
|
{v}
|
|
}
|
|
})
|
|
};
|