dioxus/examples/core/vdom_usage.rs

18 lines
427 B
Rust
Raw Normal View History

use std::time::Duration;
2021-11-01 06:41:23 +00:00
use dioxus_core::{lazynodes::LazyNodes, prelude::*};
// #[async_std::main]
fn main() {
static App: FC<()> =
2021-11-01 06:41:23 +00:00
|(cx, props)| cx.render(Some(LazyNodes::new(move |f| f.text(format_args!("hello")))));
let mut dom = VirtualDom::new(App);
dom.rebuild();
// let deadline = async_std::task::sleep(Duration::from_millis(50));
2021-09-22 06:44:01 +00:00
// let _fut = dom.run_with_deadline(|| deadline.);
}