syntax.rs 572 B

123456789101112131415161718192021222324252627282930
  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. "hello world"
  13. "hello world"
  14. "hello world"
  15. </div>
  16. };
  17. }
  18. fn rsx_uage() {
  19. let r = html! {
  20. <Fragment>
  21. "hello world"
  22. "hello world"
  23. "hello world"
  24. "hello world"
  25. </Fragment>
  26. };
  27. }