mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-14 08:27:07 +00:00
18 lines
305 B
Rust
18 lines
305 B
Rust
|
use dioxus::prelude::*;
|
||
|
use dioxus::ssr;
|
||
|
|
||
|
fn main() {
|
||
|
let mut vdom = VirtualDom::new(App);
|
||
|
vdom.rebuild_in_place();
|
||
|
println!("{}", ssr::render_root(&vdom));
|
||
|
}
|
||
|
|
||
|
const App: FC<()> = |cx| {
|
||
|
cx.render(rsx!(
|
||
|
div {
|
||
|
h1 { "Title" }
|
||
|
p { "Body" }
|
||
|
}
|
||
|
))
|
||
|
};
|