mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
17 lines
308 B
Rust
17 lines
308 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" }
|
|
}
|
|
))
|
|
};
|