2021-10-19 22:39:27 -04:00
|
|
|
use dioxus::component::Component;
|
|
|
|
use dioxus::events::on::MouseEvent;
|
|
|
|
use dioxus_core as dioxus;
|
|
|
|
use dioxus_core::prelude::*;
|
|
|
|
use dioxus_core_macro::*;
|
|
|
|
use dioxus_html as dioxus_elements;
|
|
|
|
|
|
|
|
fn main() {}
|
|
|
|
|
|
|
|
fn html_usage() {
|
2021-10-27 22:32:12 -04:00
|
|
|
let mo = move |_| {};
|
2021-10-20 01:26:52 -04:00
|
|
|
let r = rsx! {
|
|
|
|
div {
|
2021-10-27 16:58:20 -04:00
|
|
|
onclick: move |_| {}
|
2021-10-27 22:32:12 -04:00
|
|
|
onmouseover: {mo}
|
|
|
|
"type": "bar",
|
2021-10-20 01:26:52 -04:00
|
|
|
"hello world"
|
|
|
|
}
|
|
|
|
};
|
2021-10-29 00:28:23 -04:00
|
|
|
|
|
|
|
let items = ["bob", "bill", "jack"];
|
|
|
|
|
|
|
|
let f = items.iter().filter(|f| f.starts_with("b")).map(|f| {
|
|
|
|
rsx! {
|
|
|
|
"hello {f}"
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
let p = rsx! {
|
|
|
|
div {
|
|
|
|
{f}
|
|
|
|
}
|
|
|
|
};
|
2021-10-19 22:39:27 -04:00
|
|
|
}
|