1
0

fragment.rs 595 B

123456789101112131415161718192021222324252627
  1. //! Basic example that renders a simple VNode to the browser.
  2. use dioxus_core::prelude::*;
  3. use dioxus_web::*;
  4. fn main() {
  5. // Setup logging
  6. wasm_logger::init(wasm_logger::Config::new(log::Level::Debug));
  7. console_error_panic_hook::set_once();
  8. // Run the app
  9. wasm_bindgen_futures::spawn_local(WebsysRenderer::start(App));
  10. }
  11. static App: FC<()> = |ctx| {
  12. ctx.render(rsx! {
  13. h2 { "abc 1" }
  14. h2 { "abc 1" }
  15. h2 { "abc 1" }
  16. h2 { "abc 1" }
  17. h2 { "abc 1" }
  18. h2 { "abc 1" }
  19. div {
  20. "hello world!"
  21. }
  22. })
  23. };