examples: add PWA w/ Dioxus CLI template (#977)
* examples: add PWA w/ Dioxus CLI template * ci: properly set workspace and dependencies
This commit is contained in:
1 parent
b4af761038
commit
459d8d69a7
12 files changed
+407
No files matched your search
@@ -0,0 +1,20 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
fn main() {
|
||||
// init debug tool for WebAssembly
|
||||
wasm_logger::init(wasm_logger::Config::default());
|
||||
console_error_panic_hook::set_once();
|
||||
|
||||
dioxus_web::launch(app);
|
||||
}
|
||||
|
||||
fn app(cx: Scope) -> Element {
|
||||
cx.render(rsx! (
|
||||
div {
|
||||
style: "text-align: center;",
|
||||
h1 { "🌗 Dioxus 🚀" }
|
||||
h3 { "Frontend that scales." }
|
||||
p { "Dioxus is a portable, performant, and ergonomic framework for building cross-platform user interfaces in Rust." }
|
||||
}
|
||||
))
|
||||
}
|
||||
Reference in new issue
Block a user