mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-15 08:57:08 +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" }
|
|
}
|
|
))
|
|
};
|