mirror of
https://github.com/DioxusLabs/dioxus
synced 2025-03-07 00:37:43 +00:00
16 lines
431 B
Rust
16 lines
431 B
Rust
use dioxus_core::prelude::*;
|
|
use dioxus_web::WebsysRenderer;
|
|
|
|
fn main() {
|
|
// todo: set this up so the websys render can spawn itself rather than having to wrap it
|
|
// almost like bundling an executor with the wasm version
|
|
wasm_bindgen_futures::spawn_local(WebsysRenderer::start(Example));
|
|
}
|
|
|
|
static Example: FC<()> = |ctx, _props| {
|
|
ctx.view(html! {
|
|
<div>
|
|
"Hello world!"
|
|
</div>
|
|
})
|
|
};
|