dioxus/examples/manually.rs

24 lines
630 B
Rust
Raw Normal View History

2021-07-12 06:23:46 +00:00
use dioxus_core::*;
fn main() {
use DomEdit::*;
// .. should result in an "invalid node tree"
let edits = vec![
CreateElement { tag: "div", id: 0 },
// CreatePlaceholder { id: 1 },
CreateElement { tag: "h1", id: 2 },
CreateTextNode {
text: "hello world",
id: 3,
},
AppendChildren { many: 1 },
AppendChildren { many: 1 },
AppendChildren { many: 1 },
// ReplaceWith { many: 1 },
];
2021-07-16 04:27:06 +00:00
dioxus_desktop::WebviewRenderer::run_with_edits(App, (), |c| c, Some(edits)).expect("failed");
2021-07-12 06:23:46 +00:00
}
const App: FC<()> = |cx| todo!();