main.rs 529 B

123456789101112131415161718192021
  1. use dioxus::prelude::*;
  2. fn main() {
  3. // init debug tool for WebAssembly
  4. wasm_logger::init(wasm_logger::Config::default());
  5. console_error_panic_hook::set_once();
  6. launch(app);
  7. }
  8. fn app() -> Element {
  9. rsx! (
  10. div { style: "text-align: center;",
  11. h1 { "🌗 Dioxus 🚀" }
  12. h3 { "Frontend that scales." }
  13. p {
  14. "Dioxus is a portable, performant, and ergonomic framework for building cross-platform user interfaces in Rust."
  15. }
  16. }
  17. )
  18. }