demo.rs 486 B

123456789101112131415161718192021222324
  1. use dioxus_core as dioxus;
  2. use dioxus_core::prelude::*;
  3. use dioxus_core_macro::*;
  4. use dioxus_html as dioxus_elements;
  5. fn main() {
  6. std::thread::spawn(|| {
  7. let mut vdom = VirtualDom::new(App);
  8. let f = async_std::task::block_on(vdom.wait_for_work());
  9. });
  10. let a = 10;
  11. // async_std::task::spawn_blocking(|| async move {
  12. // });
  13. }
  14. static App: FC<()> = |cx, props| {
  15. //
  16. cx.render(rsx!(
  17. div {
  18. "hello world!"
  19. }
  20. ))
  21. };