mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-12-26 04:23:08 +00:00
40 lines
755 B
Rust
40 lines
755 B
Rust
#![allow(unused, non_upper_case_globals)]
|
|
|
|
//! test that we can display the virtualdom properly
|
|
//!
|
|
//!
|
|
//!
|
|
|
|
use dioxus::prelude::*;
|
|
use dioxus_core as dioxus;
|
|
use dioxus_core_macro::*;
|
|
use dioxus_html as dioxus_elements;
|
|
mod test_logging;
|
|
|
|
#[test]
|
|
fn please_work() {
|
|
static App: FC<()> = |(cx, props)| {
|
|
rsx! {
|
|
div {
|
|
hidden: "true"
|
|
"hello"
|
|
div { "hello" }
|
|
Child {}
|
|
Child {}
|
|
Child {}
|
|
}
|
|
div { "hello" }
|
|
}
|
|
};
|
|
|
|
static Child: FC<()> = |(cx, props)| {
|
|
rsx! {
|
|
div { "child" }
|
|
}
|
|
};
|
|
|
|
let mut dom = VirtualDom::new(App);
|
|
dom.rebuild();
|
|
|
|
println!("{}", dom);
|
|
}
|