dioxus/packages/web/examples/hello.rs

15 lines
276 B
Rust
Raw Normal View History

2021-02-12 21:11:33 +00:00
use dioxus_core::prelude::*;
use dioxus_web::WebsysRenderer;
fn main() {
2021-02-24 08:51:26 +00:00
wasm_bindgen_futures::spawn_local(WebsysRenderer::start(Example));
2021-02-12 21:11:33 +00:00
}
2021-02-24 08:51:26 +00:00
static Example: FC<()> = |ctx, _props| {
2021-02-12 21:11:33 +00:00
ctx.view(html! {
<div>
"Hello world!"
</div>
})
};