dioxus/packages/core/examples/vdom_usage.rs
2021-09-01 00:57:04 -04:00

15 lines
367 B
Rust

use std::time::Duration;
use dioxus_core::prelude::*;
#[async_std::main]
async fn main() {
static App: FC<()> = |cx| cx.render(LazyNodes::new(|f| f.text(format_args!("hello"))));
let mut dom = VirtualDom::new(App);
dom.rebuild();
let deadline = async_std::task::sleep(Duration::from_millis(50));
let _fut = dom.run_with_deadline(deadline);
}