mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-12-23 11:03:07 +00:00
73047fe956
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.
38 lines
990 B
Rust
38 lines
990 B
Rust
use dioxus_core as dioxus;
|
|
use dioxus_web::{prelude::*, WebsysRenderer};
|
|
|
|
// mod filtertoggles;
|
|
// mod recoil;
|
|
// mod state;
|
|
// mod todoitem;
|
|
// mod todolist;
|
|
|
|
static APP_STYLE: &'static str = include_str!("./style.css");
|
|
|
|
fn main() {
|
|
wasm_bindgen_futures::spawn_local(WebsysRenderer::start(|ctx| {
|
|
ctx.render(rsx! {
|
|
div {
|
|
id: "app"
|
|
// style { "{APP_STYLE}" }
|
|
|
|
// list
|
|
// todolist::TodoList {}
|
|
|
|
// footer
|
|
footer {
|
|
class: "info"
|
|
p {"Double-click to edit a todo"}
|
|
p {
|
|
"Created by "
|
|
a { "jkelleyrtp", href: "http://github.com/jkelleyrtp/" }
|
|
}
|
|
p {
|
|
"Part of "
|
|
a { "TodoMVC", href: "http://todomvc.com" }
|
|
}
|
|
}
|
|
}
|
|
})
|
|
}))
|
|
}
|