dioxus/examples/desktop/demo.rs

19 lines
343 B
Rust
Raw Normal View History

2021-10-01 06:07:12 +00:00
use dioxus_core as dioxus;
use dioxus_core::prelude::*;
use dioxus_core_macro::*;
use dioxus_html as dioxus_elements;
fn main() {
2021-10-16 21:04:28 +00:00
dioxus_desktop::launch(App, |c| c);
2021-10-01 06:07:12 +00:00
}
2021-10-16 21:37:28 +00:00
static App: FC<()> = |(cx, props)| {
2021-10-01 06:07:12 +00:00
cx.render(rsx!(
div {
"hello world!"
}
2021-10-04 05:28:04 +00:00
{(0..10).map(|f| rsx!( div {"abc {f}"}))}
2021-10-01 06:07:12 +00:00
))
};