dioxus/packages/core/examples/syntax.rs

39 lines
724 B
Rust
Raw Normal View History

2021-10-20 02:39:27 +00: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() {
let r = html! {
<div>
"hello world"
2021-10-20 05:26:52 +00:00
<div>
</div>
<div />
2021-10-20 02:39:27 +00:00
"hello world"
2021-10-20 05:26:52 +00:00
<Fragment>
</Fragment>
2021-10-20 02:39:27 +00:00
</div>
};
2021-10-20 05:26:52 +00:00
let r = rsx! {
div {
"hello world"
}
};
2021-10-20 02:39:27 +00:00
}
fn rsx_uage() {
2021-10-20 05:26:52 +00:00
// let r = html! {
// <Fragment>
// "hello world"
// "hello world"
// "hello world"
// "hello world"
// </Fragment>
// };
2021-10-20 02:39:27 +00:00
}