dioxus/packages/web/examples/helloworld.rs
Jonathan Kelley 73047fe956 feat: props memoization is more powerful
This commit solves the memoization , properly memoizing properties that don't have any generic parameters. This is a rough heuristic to prevent non-static lifetimes from creeping into props and breaking our minual lifetime management.

Props that have a generic parameter are opted-out of the `partialeq` requirement and props *without* lifetimes must implement partialeq. We're going to leave manual disabling of memoization for future work.
2021-06-22 17:20:54 -04:00

12 lines
248 B
Rust

use dioxus_core as dioxus;
use dioxus_web::prelude::*;
fn main() {
wasm_bindgen_futures::spawn_local(dioxus_web::WebsysRenderer::start(App))
}
fn App(ctx: Context<()>) -> VNode {
ctx.render(rsx! {
div { "Hello, world!" }
})
}