2021-08-24 16:43:46 +00:00
|
|
|
use dioxus::virtual_dom::VirtualDom;
|
|
|
|
use dioxus_core as dioxus;
|
|
|
|
use dioxus_core::prelude::*;
|
2021-09-25 01:46:23 +00:00
|
|
|
use dioxus_core_macro::*;
|
2021-08-24 16:43:46 +00:00
|
|
|
use dioxus_html as dioxus_elements;
|
|
|
|
fn main() {
|
|
|
|
let mut dom = VirtualDom::new(App);
|
2021-08-24 19:12:20 +00:00
|
|
|
dom.rebuild();
|
2021-08-24 16:43:46 +00:00
|
|
|
println!(
|
|
|
|
"{}",
|
|
|
|
dioxus_ssr::render_vdom(&dom, |c| c.newline(true).indent(true))
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-10-16 21:37:28 +00:00
|
|
|
pub static App: FC<()> = |(cx, props)| {
|
2021-08-24 16:43:46 +00:00
|
|
|
cx.render(rsx!(
|
|
|
|
div {
|
|
|
|
class: "overflow-hidden"
|
|
|
|
ul {
|
|
|
|
{(0..10).map(|i| rsx!{ li { class: "flex flex-col", "entry: {i}"}})}
|
|
|
|
}
|
|
|
|
"hello world!"
|
|
|
|
}
|
|
|
|
))
|
|
|
|
};
|