1
0

hello.rs 431 B

12345678910111213141516
  1. use dioxus_core::prelude::*;
  2. use dioxus_web::WebsysRenderer;
  3. fn main() {
  4. // todo: set this up so the websys render can spawn itself rather than having to wrap it
  5. // almost like bundling an executor with the wasm version
  6. wasm_bindgen_futures::spawn_local(WebsysRenderer::start(Example));
  7. }
  8. static Example: FC<()> = |ctx, _props| {
  9. ctx.view(html! {
  10. <div>
  11. "Hello world!"
  12. </div>
  13. })
  14. };