syntax.rs 724 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. use dioxus::component::Component;
  2. use dioxus::events::on::MouseEvent;
  3. use dioxus_core as dioxus;
  4. use dioxus_core::prelude::*;
  5. use dioxus_core_macro::*;
  6. use dioxus_html as dioxus_elements;
  7. fn main() {}
  8. fn html_usage() {
  9. let r = html! {
  10. <div>
  11. "hello world"
  12. <div>
  13. </div>
  14. <div />
  15. "hello world"
  16. <Fragment>
  17. </Fragment>
  18. </div>
  19. };
  20. let r = rsx! {
  21. div {
  22. "hello world"
  23. }
  24. };
  25. }
  26. fn rsx_uage() {
  27. // let r = html! {
  28. // <Fragment>
  29. // "hello world"
  30. // "hello world"
  31. // "hello world"
  32. // "hello world"
  33. // </Fragment>
  34. // };
  35. }