mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 22:50:19 +00:00
26 lines
585 B
Rust
26 lines
585 B
Rust
|
use dioxus::virtual_dom::VirtualDom;
|
||
|
use dioxus_core as dioxus;
|
||
|
use dioxus_core::prelude::*;
|
||
|
use dioxus_html as dioxus_elements;
|
||
|
|
||
|
fn main() {
|
||
|
let mut dom = VirtualDom::new(App);
|
||
|
dom.rebuild().unwrap();
|
||
|
println!(
|
||
|
"{}",
|
||
|
dioxus_ssr::render_vdom(&dom, |c| c.newline(true).indent(true))
|
||
|
)
|
||
|
}
|
||
|
|
||
|
pub static App: FC<()> = |cx| {
|
||
|
cx.render(rsx!(
|
||
|
div {
|
||
|
class: "overflow-hidden"
|
||
|
ul {
|
||
|
{(0..10).map(|i| rsx!{ li { class: "flex flex-col", "entry: {i}"}})}
|
||
|
}
|
||
|
"hello world!"
|
||
|
}
|
||
|
))
|
||
|
};
|