vdom_usage.rs 384 B

12345678910111213141516
  1. use std::time::Duration;
  2. use dioxus_core::prelude::*;
  3. #[async_std::main]
  4. async fn main() {
  5. static App: FC<()> = |(cx, props)| cx.render(LazyNodes::new(|f| f.text(format_args!("hello"))));
  6. let mut dom = VirtualDom::new(App);
  7. dom.rebuild();
  8. let deadline = async_std::task::sleep(Duration::from_millis(50));
  9. // let _fut = dom.run_with_deadline(|| deadline.);
  10. }