mirror of
https://github.com/DioxusLabs/dioxus
synced 2025-02-20 07:38:27 +00:00
17 lines
312 B
Rust
17 lines
312 B
Rust
use dioxus::prelude::*;
|
|
use dioxus::ssr;
|
|
|
|
fn main() {
|
|
let mut vdom = VirtualDom::new(APP);
|
|
let _ = vdom.rebuild();
|
|
println!("{}", ssr::render_vdom(&vdom));
|
|
}
|
|
|
|
static APP: Component<()> = |cx| {
|
|
cx.render(rsx!(
|
|
div {
|
|
h1 { "Title" }
|
|
p { "Body" }
|
|
}
|
|
))
|
|
};
|