dioxus/packages/core/tests/display_vdom.rs

41 lines
755 B
Rust
Raw Normal View History

2021-10-22 05:16:39 +00:00
#![allow(unused, non_upper_case_globals)]
//! test that we can display the virtualdom properly
//!
//!
//!
use dioxus::prelude::*;
use dioxus_core as dioxus;
2021-09-25 01:46:23 +00:00
use dioxus_core_macro::*;
use dioxus_html as dioxus_elements;
mod test_logging;
#[test]
fn please_work() {
2021-10-16 21:37:28 +00:00
static App: FC<()> = |(cx, props)| {
rsx! {
div {
hidden: "true"
"hello"
div { "hello" }
Child {}
Child {}
Child {}
}
div { "hello" }
}
};
2021-10-16 21:37:28 +00:00
static Child: FC<()> = |(cx, props)| {
rsx! {
div { "child" }
}
};
let mut dom = VirtualDom::new(App);
dom.rebuild();
println!("{}", dom);
}