Fix the router and stub out a number of crates to get compiling

This commit is contained in:
Jonathan Kelley committed 2024-01-13 20:51:37 -08:00
1 parent 4c6e515da4
commit fae0b08e61
226 files changed
+1057 -1482

No files matched your search

+7 -8
View File
@@ -7,21 +7,20 @@ fn main() {
dioxus_desktop::launch(app);
}
fn app(cx: Scope) -> Element {
let signal = use_signal(cx, || 0);
fn app() -> Element {
let signal = use_signal(|| 0);
use_future!(cx, || async move {
use_future!(|| async move {
loop {
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
*signal.write() += 1;
}
});
let local_state = use_state(cx, || 0);
let computed =
use_selector_with_dependencies(cx, (local_state.get(),), move |(local_state,)| {
local_state * 2 + signal.value()
});
let local_state = use_state(|| 0);
let computed = use_selector_with_dependencies((local_state.get(),), move |(local_state,)| {
local_state * 2 + signal.value()
});
println!("Running app");
render! {